Update Object

NOTE: The Salesforce section of this documentation is under construction. The articles in this section may be incomplete.

Send data, including attachments and new field values, to an existing Salesforce object.

Inputs

KeyValue
sObjectNameRequiredThe Salesforce object type that you want to update (e.g. “Opportunity”, “Account”, “WorkOrder”, etc.)
sObjectIdRequiredThe unique ID of the Salesforce object that you want to update.
pdfUrlOptionalThe location of the PDF that should be sent to the Salesforce object as an attachment.
pdfNameOptionalThe desired name of the PDF that will be attached to the Salesforce object.
field_<field_name>OptionalThe value to be uploaded into the Salesforce object field with name "<field_name>". So if the key is field_Priority, then the chosen Salesforce object’s “Priority” field will be filled in with the corresponding value.

Outputs

OutputValue
newAttachmentIdThe unique Salesforce ID of the newly created PDF attachment. This will be blank if no attachment was created.

Usage

This action is typically used in conjunction with a Form Completed trigger to update Salesforce with the results of a completed GoFormz form, so the update values for the field_<field_name> keys are typically taken from the Salesforce form field values in the output of that trigger.

When uploading a PDF to Salesforce, this is usually a form PDF obtained using the Export Form To PDF action, so the pdfUrl is typically obtained from the output of that action.

There are different ways to obtain the Salesforce object ID for the sObjectId input. Often, this function is used on the back end of a round-trip Salesforce → GoFormz → Salesforce workflow combination, where a GoFormz form is first created/updated from a Salesforce object, and when the form is completed the data it captured is used to update that same object. In this scenario, the object's ID can be added to the form on the front end of this round trip — so when the time comes for the Update Object action, it can simply be retrieved from the form. If the ID is not available in this way, then you can use other object properties to retrieve the ID via a Salesforce Lookup or Query action. For instance, you may have the name and email address of a contact from a completed form; to update this contact's corresponding Salesforce record, you would first use the name and email address to retrieve the record ID using Lookup or Query, and then use that ID in the Update Object action's sObjectId input.