I've created a landing page that updates some fields in Salesforce Object 'MktStatus__c'.

 var @updateRecord
    set @sk = '003D000000zm6gXIAQ'
    set @mct = '03'
    set @fieldname1 = concat('OptInMcT',@mct,'Date__c')
    set @fieldname2 = concat('OptInMcT',@mct,'Source__c')
    set @fieldname3 = concat('OptInMcT',@mct,'Status__c')
    set @fieldname4 = concat('OptInMcT',@mct,'__c')

if not empty(@mct) then
set @updateRecord = UpdateSingleSalesforceObject(

set @updateRecord = UpdateSingleSalesforceObject(

The issue is that every time I run the landing page it shows an ERROR 500, and if I do the preview including the code in an email it displays an error saying:

'Call to update the salesforceobject MktStatus__c ID = 003D000000zm6gXIAQ failed! Error in the application.'

The record exists, the concat function and the fields name are okay, and the API user has the permissions to view and edit any object/field in Salescloud. I also noticed that this issue happens when I try to update anything in any object, but everything is okay when I have to read (e.g. using RetrieveSalesforceObjects AMPScript function).

I don't know what else to do to identify the issue. May it is related to the Marketing Cloud Connector set-up?

2 Answers 2


It might have to do with the date format - your first field is a Date, which is notoriously problematic.



instead of




The problem was related to the ID we were using as the second parameter of the function was the wrong one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .