Salesforce Select Child Record Filter

In this guide, we will demonstrate how you can create a related record select list. For example, you can create a list of Contacts, Opportunities or Cases related to an account on Salesforce.

We will use the filter option on the Salesforce Select List element to display only the Contacts that are related to a specific Account record that will be found via the Salesforce Lookup element.

Please note that the child record filter will work only in online mode as the information is pulled back directly from Salesforce in real-time.

1. Go to Formyoula.com and click “Sign In”.

image

2. Click “New Form”.

image

3. Click “Rename” to give your new form a name.

image

4.  Forms can have multiple pages. We will leave one with the standard name “Details”.

image

5. Drag and drop the fields on your form. First, we will add a Salesforce Lookup element. This will be used to find an Account record.

image

6. Click on the “pencil” icon to edit the field. Select the “Account” from the “Object” drop-down list. This will allow you to search for Account records on Salesforce when using the Lookup element. Rename the label as needed. Apply the changes when done.

image

7. Next, drag and drop a Salesforce Select element on your form.

image

8. Click on the “pencil” icon to edit the field. Select the “Contact” from the “Object” drop-down list. This will allow you to list Contact records from Salesforce when using the Select element. Rename the label as needed. Apply the changes when done.

image

9. Drag and drop any other fields you need for your particular use case.

image

10. Click “Save & Close” to save your form.

image

11. Next, we will need to get the Formyoula Salesforce Lookup field ID to use it in the Select element filter. Select the “PDF Editor” from the “Actions” drop-down list on your Dashboard.

image

12. Select the Lookup field. In this case, the field is named “Find Account” and copy the ID.

image

13. Next go back to the dashboard and click on your form name to return to the form builder.

image

14. Click on the pencil icon on the Salesforce Select element and insert this syntax in the “Record Filter”: AccountId = '{{Merged Lookup Field}}', in this case: AccountId = '{{570f-ba80-3af3}}'. Apply the changes when done.

image

15. Click “Save & Close” to save your form.

image

16. Click on the “Try” button next to the form. This will open the mobile web app.

image

17. Select the newly created form.

image

18. Use the Lookup element to find an Account record in Salesforce.

image
image

19. Next click on the Select element and it will display a drop-down list with all Contact records that are related to the Account record you selected via the Lookup element.

image

20. Submit the form when finished.

image

[Optional] You can use the JavaScript element to refresh the Salesforce Select Child Record if you change the record on the Salesforce Lookup field.

1. Please drag and drop the JavaScript element.

image

2. Please edit the field and add the following code:

window.formyoula.form_fields['Find Account Record'].on('change:value', function(){

window.formyoula.form_fields['Find Contact Record'].set( { value: '', name: '' } );

});

image

Please change the ‘Find Account Record’ and “Find Contact Record’ values to your Salesforce Lookup and/or Select field labels.

For any questions, please contact us - [email protected].