Pre-populating values with data from the logged in user's Salesforce Contact record

created

If your site has a password-protected area and its users are connected to Salesforce Contact records in your Salesforce instance, you can use the value of any field on the Contact object to pre-populate the fields on a Forms page.

To do so, insert the Salesforce Field Name as the Default Value in the following format:

{$FieldName}

For custom fields, the Field Name will always contain "__c":

{$CustomFieldName__c}

submit-variable-example-thumb.png

Locating Field Names in Salesforce

To locate the Field Names for your Contact object in Salesforce, go to Setup > Customize > Contacts > Field Names. The Field Name is identified in the middle column of this view:

sfdc-contact-field-names.png

sfdc-contact-gears.pngIf you are viewing the Contact object, you can use the blue tab with the arrow on the right of the page to easily access the Setup view in Salesforce. After clicking the arrow, a panel will expand. Click View Fields.

Locating Field Names in Soapbox

The Field Name for Salesforce is shown in brackets for a Salesforce Element. if you've included the Contact field you wish to use as the Default Value for a form, you can see that Field Name in Soapbox.

Example Use Case: Form posting to Lead Object

 

submit-variable-form-thumb.pngIf you have a form posting to the Lead object for a petition, a contact us form, or some expression of interest, you can use the variables from the logged in user's Contact record to populate corresponding variables on the Forms page posting to the Lead object so the logged in user doesn't need to enter those fields manually.

 

 

 

 

 

 

For a list of all variables available in Forms, refer to Variables available for Forms default values. For details on using the logged in user's Soapbox username or email address as default values, go refer Pre-populating values with logged in user's Username and Email. For information on using the visitor's IP Address, refer to Using submitter's IP address as a Default Value.

For information on how to use pre-populated values to create records in Salesforce that are children of the logged in user's Account or Contact, refer to Creating records related to logged in user's Contact or Account record

Have more questions? Submit a request
Article is closed for comments.