Objective
After reading this article, you will understand how to link form fields to other fields in Salesforce, and how the Form object relates with other objects in your Salesforce environment.
Before you get started
These articles might be helpful before you read further:
Introduction to Field Links
The Field Link is a special question type that allows you to map a question on a form to a field on an object in Salesforce. This question type is also what allows forms to be prepopulated with data from Salesforce.
Reasons why you might want to use field links are as follows:
- Your organization wishes to fill out many forms over time, and have those forms related to records in Salesforce.
- Your organization wishes to use forms to update fields on records in Salesforce.
- Your organization wishes to prepopulate forms with data from records in Salesforce.
- Your organization wishes to use forms to create new records in Salesforce.
When a field link question is selected in the Form Template Builder, you must first select the object to which the field will be linked (field link lookup). Out of the box, Youreka comes with five objects pre-configured for use with field links.
Field Link Lookup |
Object Name |
disco__Form_Account__c |
Account |
disco__Form_Contact__c |
Contact |
disco__Form_Case__c |
Case |
disco__Form_Opportunity__c |
Opportunity |
disco__Form_Lead__c |
Lead |
After selecting the desired object, select which field on that object to link your question to. For example, if you select Contacts, they you have the option to decide if the field link will be mapping to Contact First Name, Last Name, Job Title, or another field that exists on the Contact object.
If you wish to Field Link to an object other than the five objects listed above, a lookup relationship must be made on the Form object to the desired object. This can be done by visiting the Object Manager in Setup and creating a lookup field on the Form object. This can also be accomplished by using the Relationship Builder, which is accessible from the Form Template Builder when you add a Field Link question (see our Relationship Builder article to understand more on this).
For example, if your organization is interested in using forms to collect information about Work Orders in Salesforce, you must add a lookup relationship from the Form object to the Work Order object.
In the image below, we are creating a Field Link to the Contact object, which will ultimately allow the form to capture data and map to a Contact record in the system.
Also pictured are many of the other objects in the system (standard or custom) that are available for Field Linking. These objects are available for Field Linking because we have created a lookup field on the Form object to each of these other objects in Setup.
After selecting which object to field link to, we must select a field on that object.
In the example above, we selected the First Name field on the Contact object. As a result, when users fill out a form and enter information into this field, the data will be mapped to the Contact First Name field in Salesforce.
Allow New Records
It is important to remember that as a result of using the field link question type, Youreka's forms can not only update existing records in the system, but they can also create new records in Salesforce. In order to have a Form create a new record in the system, the Form Template must allow for it. Visit a Form Template record in Salesforce, edit the template and then select Allow New Records in the top-left corner. After checking the boxes for each field link lookup, the Form Template will now allow forms to be able to create new records of that type.
As part of this process, you will want to make sure that your form template contains field link questions for any required fields for this object. For example, the Last Name field on the Contact object is required in Salesforce, so make sure that the Last Name field exists on your Youreka form template before allowing new Contact records.
Considerations for Using Field Links
- If you field link to a Salesforce Formula field, the field will be shown in Youreka as a read-only field, with a small button next to the field which allows the user to recalculate the formula.
- As a general rule, try to avoid deleting fields in Salesforce which may have field links. If you must delete a field, ensure that all form templates which may be field linking to that field are updated to no longer do so (in the case that the template has not yet been used). In the event forms have already been completed for a template which contains a field link to a deleted field, deactivate the Form Template, remove any related Forms from mobile, and lock the forms.
- When field linking to a picklist in Salesforce, Youreka automatically creates Question Values that mirror those of the picklist values on that picklist in Salesforce. Should the picklist values in Salesforce change, you will need to go back to the template, click the gear menu and select Validate Template to ensure that the list in Youreka matches that in Salesforce. This is important because if this step is not completed and your picklist is set to restricted, Youreka users may face errors while completing forms.
- Allow New Records is not available for objects that are the child in a non-reparentable master-detail relationship.
Comments
0 comments
Please sign in to leave a comment.