XML problems inserrecord potential
I think this is mostly due to the fact that I am unfamiliar with XML and this particular notion of PHP cURL.
When I write the XML, do I have to input all the fields or just the ones marked as necessary. For example
the oppurtunity has (accountID, ContactID,oppurtunityName, date Due, Mailing) and lets so I didnt want to add mailing, does <fl val="mailing"> still need to be there?
I ask this because I just did this:
<?xml version="1.0" encoding="UTF-8" ?>
<Potentials>
<row no="1">
<FL val="ACCOUNTID">accountID is in here</FL>
<FL val="Potential Name">Potential Name is in here</FL>
<FL val="Stage">"Perdu"</FL>
<FL val="Closing Date">01/04/2009</FL>
</row>
</Potentials>
and in php
$query = "newFormat=1&authtoken={$authtoken}&scope=crmapi&xmlData={$xmlData->asXML()}";
$ch = curl_init();
/* set url to send post request */
curl_setopt($ch, CURLOPT_URL, $url);
/* allow redirects */
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
/* return a response into a variable */
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/* times out after 30s */
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
/* set POST method */
curl_setopt($ch, CURLOPT_POST, 1);
/* add POST fields parameters */
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);// Set the request as a POST FIELD for curl.
//Execute cUrl session
$response = curl_exec($ch);
curl_close($ch);
echo $response;
and it used to return errors, now after a fixes it returns nothing and the oppurtunity is not created
any help would be greatly appreciated
Thank you