The Salesforce Lookup is not a straightforward field and when it comes to mapping it in your Get integration it returnes the ID by default, instead of its textual value (which is what the fillers are really interested in). But using FormTitan you can easily reach the related fields and display them instead of the ID. In fact, the mapping enables you to draw related fields 3 data levels deep.
Following are 2 examples to demonstrate mapping a Lookup field in order to
1- display the text and not the ID of the Lookup
2- use it as a means to draw other data from related fields/objects.
Example 1: Display the text and not the ID of the Lookup
Follow the steps:
1- Create some test data in Salesforce
Create an Account: Test
Create a contact under this account: amy weinberg
Create a case under this contact: my case 1
2- In the form builder: create a new blank form
3- drag a table element
4- Configure the columns:
Case subject, Case number, Contact name
5- Set the Get integration to draw the case you created
- authenticate with Salesforce
- Select object: Case
- Turn on the ‘execute on form load’ checkbox
- Set a condition
Case ID Equals Other specify Case id, in this case: 5005800000ZKjEp
- Map fields:
Case subject → Subject
Case number → Case Number
Contact Name → Contact ID → Full Name
In order to populate the Contact name field with text rather then the ID number you will need to:
- choose ’Contact ID’ in the dropdown (this is the only way to choose the ‘Contact Name’ Lookup, and if we leave like it is it will draw the ID behind it) .
- Now a secondary dropdown will appear and you will need to select a related text field that contains the Contact name, in our case: full name.
- Press ‘Apply’ and save the form
6- Now test your form
Publish it as URL
You will see that the Contact name now contains text instead of the Id
Example 2: use the Lookup as a means to draw other data from related fields/objects
- First enter the ‘Test’ account you created in Salesforce in the first example and update its ‘account type’ to ‘Prospect’.
- Let's continue where we left off in the previous example
7- Add an additional column: Account type
The Case object includes a Contact Name Lookup as well as an Account Name Lookup - we can use one of them to reach the ‘related Account’ type field.
8- Add mapping to this field in your existing Salesforce integration.
- Press on the “Edit” icon
- Enter the ‘Map fields’ window again and add mapping for the new column:
Account Type → Contact ID → Account ID → Account Type
In order to populate the column with the ‘Account Type’ value you will need to:
- Choose ’Contact ID’ in the dropdown
- A secondary dropdown will appear and you will be able to choose the other lookup: ‘Account ID’.
- And then a third dropdown will appear and you will be able to choose the related field, in our case: Account type.
- Press ‘Apply’ and save the form
9- Now test your form again
Publish it as URL
You will see that the Account type now contains the value : Prospect.