Update an Existing Salesforce Record

Learning Objectives

After completing this tutorial, you’ll be able to:

  • Understand and be able to Add Field Links to your Form Template
  • Alter Store Visit Form to Field Link Contact Information to a Contact Record

Prerequisites: Build Your First Form Template & Branching Logic


What is a Field Link?

A field link is a Youreka question type that maps to fields within Salesforce. This powerful question type allows users to select a lookup object and then a corresponding field for that object. Setting a field link question type will allow that form’s question to inherit the existing field value from the Salesforce record (Contact, Opportunity, etc.).  For example, when a user field links to the Email field (a standard field) on the Contact Record, the form will then prepopulate that Contact’s email address when the form is opened or update that field if the user is capturing a new email address for that contact. This also works for custom fields on any object!

So far in these tutorials, we haven’t linked to any Salesforce fields. All of our Contact and Account Information fields have been text inputs that the Arabica Coffee rep would need to re-enter every time they created a new form.

In this tutorial, we will field link the contact and account information in the Arabica Coffee Store Visit form to records within Salesforce so that when an Arabica field representative visits a store, they can prepopulate these fields with the account and store manager’s contact information as soon as they arrive. It saves the rep from having to enter known data on the spot and also from re-keying that data into Salesforce after the visit. The rep can simply confirm the account and store’s manager’s contact information, make updates if necessary, and then begin their store visit.

Add Field Links to your Template

  1. Log in to Salesforce and navigate to the Form Templates Tab. Open your Arabica Coffee Store Visit Form Template by clicking on the Form Template Name.
  2. Delete any forms that may have been associated with the template up to this stage before editing.
  3. Click Edit to launch the Template Builder.
  4. Edit the Account Name question field by clicking the pencil edit icon.
    1. Change the Field Type from Text to Field Link.
    2. Set the Field Link Lookup to disco__Form_Account__c.
    3. Set the Field Link Field to Account Name. (Note all other options available from the Account Object like Description, Type, Billing information, etc.)
    4. Click Save and return to the Template Builder screen.
      **Note: A red star will appear next to the Account Name on the Template Builder Screen. This indicates that the field is required on the form. Any field linked fields that are required on an object will also be required fields on the form.
  5. Edit the Street Address question field by clicking the pencil edit icon.
    1. Change the Field Type from Text to Field Link.
    2. Set the Field Link Lookup to disco__Form_Account__c.
    3. Set the Field Link Field to Billing Street.
    4. Click Save and return to the Template Builder screen.
  6. Repeat the same steps in the left-hand column of your template for City, State and Account Phone. All should link to the Account Object with the Field Link Fields.
    • City: Billing City
    • State: Billing State/Province
    • Account Phone: Account Phone
  7. Move over to the right column of your Store Contact Information Section to make the same adjustments to the Store Manager’s contact information. For these fields, we will link to the Contact Object.
  8. Modify the existing Store Manager First and Last Name fields to link to the Contact a Record.
    1. Edit the Store Manager First Name question field by clicking the pencil edit icon.
      1. Change the Field Type from Text to Field Link
      2. Set the Field Link Lookup to disco__Form_Contact_c
      3. Set the Field Link Field to First Name
      4. Click Save and return to the Template Builder screen
    2. Edit the Store Manager Last Name question field by clicking the pencil edit icon.
      1. Change the Field Type from Text to Field Link
      2. Set the Field Link Lookup to disco__Form_Contact__c
      3. Set the Field Link Field to Last Name
      4. Click Save and return to the Template Builder screen
        **Note: Again, the Last Name field will have a red star indicating a required field on the form because Last Name is also a required field on the Contact record.
  9. Repeat the same steps in the right-hand column of your template for Phone and Email Address. All should link to the Contact Object with the Field Link Fields.
    • Phone Number: Business Phone 
    • Email Address: Email
  10. When all fields have been updated, Save your form. Save and Close to navigate back to the Form Template Detail page.

Create a New Form to Test Field Links

  1. From the Form Template Detail page, Publish your template and create a New Form by clicking the blue + New Form button.
  2. Now that we’ve added field linked fields to our template, the New Form Wizard will appear which requires that you select an Account and Contact from within Salesforce to complete the form.
  3. Click the magnifying glass next to these fields to open your list of Salesforce account and contacts. The Arabica rep would select one of their accounts (Monroe Markets) and store managers (Peter Parker) from the respective lists. Select an account and contact from your list that you’re comfortable using to test this form and then select the blue Complete New Form button.New Form Wizard.jpg
  4. From the Complete Form Page, we will see that the Store Contact information has been prepopulated. If you have not completed the Display Logic tutorial, then all of your data will be visible. If you have completed the Display Logic tutorial, your Phone Number and Email Address Fields will not be visible unless you select Peter Parker’s preferred contact method.Field Links Account Information.jpg
  5. If you set Peter Parker’s Preferred Contact Method as Email, notice that his email address prepopulates as well.FL Email Prepopulated.jpg
  6. If the Arabica rep were to discover that any of this information is inaccurate, they could make updates that would be reflected on the record in Salesforce upon saving. To demonstrate, we will change Peter Parker’s email address to parker@gmail.com and then Save the form to navigate back to the Form Detail page.
  7. From the Form Detail Page, Youreka makes it easy to navigate to your next destination within Salesforce. From the Navigate To dropdown menu on the left side of the Form Detail Screen, you can return to the Form Template Detail Page, or navigate to any related records on that form. In this case, we have the option to navigate to Peter Parker’s Contact Record.Navigate To-1.jpg
  8. When we open Peter Parker’s Contact Record, we will see that his email address has now been updated to the new address based on the new data captured in the Store Visit form.

 


Make Fields Read Only

Do you need to prevent your form filler from updating fields but still want this information available for reference on the form? Youreka supports the ability to enforce Read Only data in Salesforce by making questions Read Only on forms. This is useful in instances where your form filler needs to be able to view Salesforce data on a form but not be able to edit that information. This gives administrators peace of mind and control over what can be altered by form fillers who shouldn’t have direct access or permission to update fields in Salesforce. Read only fields are available only in Field Link question types so that the information is prepopulated from Salesforce.

In this example, we’re going to make the Account information read only on the form. The store visit rep will still be able to view the account information like Account Name, Address, and Phone Number, but we want to prevent any edits to this information.

  1. Return to your Arabica Coffee Store Visit template. Delete the previously created form and click Edit to open the Template Builder.Read Only 1.jpg
  2. Edit the Account Name question in the Store Contact Information Section. In the question modal, check the Read Only checkbox.
  3. Repeat this action for the Street Address, City, State, and Account Phone questions.
  4. Save and close out of the template builder. In the upper right-hand corner of the Form Template Detail page, click the gear icon and Publish your form.
  5. Click the + New Form button to create a new form. In the New Form Wizard, select the test account and contact you used earlier in this tutorial and click Complete the New Form.
    New Form Wizard.jpg
  6. The new form will appear and be prepopulated with the selected Account and Contact information. Notice now that the Account details are visible but are now gray and unable to be updated by the form filler.Read Only 3.jpg
  7. After confirming that the read only fields appear correctly on your form, Save and Close the form to return to the Form Detail page.

Youreka doesn’t just update existing Salesforce records, you can also create brand new records right from a form! Learn how with our Allow New Records Tutorial.

We use cookies to ensure that we give you the best experience on our website.
If you continue to use this site we will assume that you are happy with it.