can someone help me to write a code that will retrieve a salesforce object. The name of the field in SF is: Preferred Contact Time The name of the field in MC synced is: Preferred_Contact_Time_Pez__c
This field exists in the lead in SF. Once i get the code, i will put in HTML in an email. Thanks
Im new to AMPSCRIPT and programming in general. Here is the last one i tried,
%%[
VAR@PreferredContactTime
SET@PreferredContactTime=RetrieveSalesforceObjects(“Lead”,”FirstName,LastName,Email”,”Id”,”=”,_Subscriberkey)
If RowCount(@PreferredContactTime)==1
then
VAR@PreferredContactTime,@FirstName
SET@PreferredContactTime=Row(@PreferredContactTime,1)
Endif
]%%
<!--
. When providing code and/or markup (like html) it helps if you tell SFSE to format that text as a block of code. The{}
button in the rich text editor formats a highlighted section of text as a code block (ctrl
+k
,cmd
+k
on mac, does the same thing)