1

I want to retrieve/update the custom object which is on the connected sales cloud org.

For that, I'm used the Ampscript 'RetrieveSalesforceObjects()' and 'UpdateSingleSalesforceObject()' methods but the are not working,

Set @ParticipantId = RetrieveSalesforceObjects('Participant', 'ParticipantID', 'Id', '=','aN4*******8j')

UpdateSingleSalesforceObject('Event Participant',@ParticipantId,'Opt Out','true')

But when I tried these methods on the standard object to update/retrieve they are working fine.

I'm not getting, where exactly the problem is? Is there anything related to the object permissions?

1 Answer 1

1

You should use the API names of the objects you want to retrieve/update. Hence your AmpScript calls should be:

Set @ParticipantId = RetrieveSalesforceObjects('Participant__c', 'ParticipantID', 'Id', '=','aN4*******8j')
UpdateSingleSalesforceObject('Event_Participant__c',@ParticipantId,'Opt Out','true')

Please do verify the naming by logging into Sales Cloud, and viewing the object properties there.

3
  • Thank you @Lukas for the response, Yes I'll verify the names, also for a field name we need to use the API name? Apr 4, 2019 at 11:33
  • Yes - the same applies for fields Apr 4, 2019 at 11:33
  • 1
    Okay-I've tried by using the API names and it's worked. Thank you once again @Lukas Apr 4, 2019 at 11:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.