//Code to retrive object via Ampscript

%%[
var @Contact, @ContactRow, @Name, @Email, @Marketing, @Reminder
Set @Contact = RetrieveSalesforceObjects(‘Contact’, ‘Name,Email,Marketing_Opt_Out__c’, ‘Email’, ‘=’, ‘paulgchua@gmail.com’)
Set @ContactRow = ROW(@Contact,1)
Set @Email = FIELD(@ContactRow,”Email”)
Set @Name = FIELD(@ContactRow,”Name”)
Set @Marketing = FIELD(@ContactRow,”Marketing_Opt_Out__c”)

UpdateSingleSalesforceObject
]%%

%%=v(@Name)=%%
%%=v(@Email)=%%
%%=v(@Marketing)=%%

//Code to Update Salesforce Object via Ampscript

%%[
var @result
set @result = UpdateSingleSalesforceObject(‘Contact’,’00336000010ODV2′,’Marketing_Opt_Out__c’,’true’)
]%%

%%=v(@result)=%%