function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KunlunKunlun 

PHP api error, but update to SF successfully

Hi All,

 

I created some php code as below to create case in SFDC.

 

When I run the code, it threw an error as below, but created in SFDC successfully.  I checked all the code are correct, is there any suggestion?

 

"An invalid XML character (Unicode: 0x1) was found in the element content of the document."

 

Below is the code:


    $createFields = array (
        'Shipment_Tracking_No__c' => $chexTracking,
        'AccountId' => $accountId,
        'ContactId' => $contactId,

        ........
    );

 

    $sObject1 = new SObject();
    $sObject1->fields = $createFields;
    $sObject1->type = 'Case';
    $debugLog .= "<br/>Creating New Case...<br/><br />";
    $createResult = $sforce->create(array($sObject1));

 

Thanks

Kunlun