1

Error

Lead: id value of incorrect type: EMAIL_HERE

Code

$body = [
       'Name' => 'Survey',
       'Lead__r:MySQL_Email__c' => 'EMAIL_HERE'
   ];
    $result = Forrest::sobjects('Survey_Data_Object__c/External_Id__c/' . SURVEY_ID,[
        'method' => 'patch',
        'body'   => $body]);

This doesn't work for some reason. I have also tried the following in body:

  1. Lead__c
  2. MySQL_Email__c

I have also tried this but got an error.

'Lead__r' => '{MySQL_Email__c: \'EMAIL_HERE\'},'

Error The value provided for foreign key reference Lead__r is not a nested SObject

  • The latter should work as long as MySQL_Email__c is an External Id field. – Adrian Larson Apr 10 '18 at 12:37
  • MySQL_Email__c is an External ID field on Lead, not Survey Data Object. Errors though – Ali Gajani Apr 10 '18 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.