This guide will explain how to use the ‘toLabel()’ function to prefill Salesforce picklists with API values. It will make sure to display the Salesforce Picklist field value instead of the value API.
- Initial Setup:
- Drag and drop a “Salesforce Lookup” field, a “Salesforce Prefill” field, and two “Text” fields onto your form. Rename these fields as needed.
- Configuring The “Salesforce Lookup” Field:
- Click the pencil icon of the “Salesforce Lookup” field.
- Set the “Object” and “Display Additional Fields” options.
- Configuring The “Salesforce Prefill” Field:
- Click the pencil icon of the “Salesforce Prefill” field.
- Set the “Object”, “Formyoula Parent Field”, and “Salesforce Parent Field” options.
- Map the Form fields with the Object fields.
- Use the ‘
toLabel(Country__c)
’ function for Picklists with API values in the “Salesforce Prefill” field. - Here ‘
Country__c
’ is an Object Picklist field with API values. - Save the changes.
Note: You can use this highlighted Text to switch Object fields from List to Text.
- Test the Form:
- It will display the Salesforce Picklist field value instead of the value API.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂