I am trying to save the send date in a Sales Cloud field with this expression:

%%[SET @Lead_Id="00Q3100000Z3HIcAAN", SET @result = UpdateSingleSalesforceObject('Lead',@Lead_Id,'Reminder_Email1_Sent__c',Now())]%%

This results in an error.

Call to update the salesforceobject Lead ID = 00Q3100000Z3HIcAAN failed! Error in the application.

Has anybody an idea why?

The field 'Reminder_Email1_Sent__c' is a date field on a Lead Object.

  • what error you getting
    – Ravi.A
    Jul 3, 2018 at 13:51
  • Do you have a integration between salesforce to salesforce marketing cloud?
    – Ravi.A
    Jul 3, 2018 at 13:59
  • Error is outlined above. >> Call to update the salesforceobject Lead ID = 00Q3100000Z3HIcAAN failed! Error in the application.<< Yeah it is integrated and other updates are working well in the same email. Jul 3, 2018 at 15:32

2 Answers 2


This could be due to different reasons, but guess would be that the date time format generated by the Now() function is not in the same syntax that is required by the date field in Sales Cloud.

I would try formatting the date as follows:

var @Lead_Id, @result, @dateTime

set @dateTime = Replace(FormatDate(Now(),"yyyy-MM-ddT","hh:mm:ss"),' ','')
set @Lead_Id = "00Q3100000Z3HIcAAN"
set @result = UpdateSingleSalesforceObject('Lead',@Lead_Id,'Reminder_Email1_Sent__c',@dateTime)
  • how should this be done for a Date field? (not datetime) @Eliot Harper
    – sfdcFanBoy
    Jul 26, 2019 at 7:44

@Alexander Schmelzer first check integration is there or not if integrated mean try like this

    var @result
    SET @Lead_Id="00Q3100000Z3HIcAAN"

    SET @result = UpdateSingleSalesforceObject('Lead',@Lead_Id,'Reminder_Email1_Sent__c',Format(Now(),"yyyy-MM-dd"))
  • 1
    This answer may work, but the timestamp will be stripped. I'd suggest trying my answer first. Jul 3, 2018 at 14:40
  • @pkharries, thank you for your answer, unfortunately, it did now work. I got the same error like before. Jul 3, 2018 at 15:31

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.