How to Update a Record in Salesforce with your Form

FormAssembly.com supports Salesforce's upsert method, to insert or update records in Salesforce.

The Upsert Key

An upsert key is a field in Salesforce that can be used to uniquely identify a record. They are marked with the ² superscript character in the mapping section of the connector. Typically, the object ID and sometimes an email address or a file name can be used as upsert keys.

To update a record, the upsert key must be defined in the connector mapping and the 'upsert' checkbox must be checked.

The key can be mapped to a fixed value (therefore always updating the same record), or to a value provided in your web form.

Setting the Upsert Key with your Web Form

A word of caution: If your set up your form to update records in Salesforce, you need to make sure that you have absolute control over who accesses the form and what information is entered. You should also read our documentation on how to create a secure API users so that you can limit access to your data to the strict minimum.

  1. If necessary, add a field to your form using our form builder to store the upsert key. If you don't need your user to edit this field, set it as a hidden field.
  2. In the connector, map the hidden field to the corresponding Salesforce field and check the 'upsert' checkbox. #
  3. If you are populating your form from Salesforce, make sure to provide the value for the upsert key in the link. For instance:

    http://app.formassembly.com/forms/view/90?tfa_Company={!Lead.Company}&tfa_LeadId={!Lead.Id}