I have created a connection via SOAP with PHP and I am trying to create a new Case when the user submits the form. I have the SFDC Contact ID of the user and I am trying to insert the Contact Id into the Contact field.
Contact is a Lookup(Contact) field.
Here is my code
$sObject = new stdclass(); $sObject->Contact = '00390000002XUAx'; // Test Victor $sObject->Product__c = '01t9000000568wx'; //Test LBD $sObject->EventProgram__c = '7016F0000025iQx'; //Test LBD - 15/03/2018 $sObject->Permission_to_use_in_Marketing__c = 'True'; $sObject->Description = 'Testing the Case with test text.'; $sObject->Subject = 'TEST SOAP - F2F Eval';
I am getting the following error:
**** Creating the following: stdClass Object ( [errors] => Array (  => stdClass Object ( [message] => No fields provided in an external foreign key reference in entity: Contact [statusCode] => INVALID_FIELD ) ) [id] => [success] => )
Any help would be greatly appreciated. Thanks.