Updates a record in an object in your integrated Salesforce account. You can specify multiple additional field and value pairs as part of an AND clause. Returns 1 for success or 0 for failure.

The UpdateSingleSalesforceObject function is executed when previewing your code in a CloudPage or message. As a result, the code preview can update a record in your integrated Sales and Service Cloud org. If you wish to prevent this, you can check that the message or page is not being loaded in the preview context before executing the UpdateSingleSalesforceObject function as follows:

UpdateSingleSalesforceObject(1, 2, 3, 4)

1stringRequiredType of object to update, such as Lead or CustomObject.
2stringRequiredThe ID of the object to update.
3stringRequiredThe name of the field to update.
4stringRequiredThe value to update the field with.

To set a value within an existing record to NULL (setting Phone value to NULL in this example):