Skip to content

Create a Workflow Rule that will pre-fill information from a related object

When searching on Salesforce directly or using Formyoula, you will only be able to find records where your search matches one of the objects searchable fields. Currently, the Salesforce lookup and formula fields are not searchable. Searching for Contacts based on the Account name is not possible because the Account is a lookup field on the Contact object and is not searchable. We would need to have the Account name available directly on the Contact record in a searchable field type like the text field to enable Contact search based on the Account name.

In this guide, we will explain how to create a Workflow Rule in your Salesforce, that will automatically prefill the Account Name in a text field on the Contact record.

To start, please go to Setup => Contacts => Fields

And please create an “Account Name” text field by pressing the “New” button

When all the steps are completed, please click “Save”.

Now please go to Setup => Create => Workflow & Approvals => Workflow Rules and please click on the “New Rule” button.

Please select the Contact object and click on the “New” button.

Please add a Rule Name, select “created, and any time it's edited” radio button and set the Rule Criteria to “Criteria are met when Contact: Last Name not equal to blank”.

When done, please click on “Save & Next”.

Now please select the “New Field Update” option in “Add Workflow Action” drop-down list.

Please add a name, select the “Account Name” field in the “Field to Update” drop-down list under “Custom Fields”. And please add “Account.Name” in the formula text area.

When done, please click on the “Save” button.

You can test the Workflow Rule, by adding the new field to the Contact Page Layout and creating a new Contact record.

The Workflow Rule will automatically pre-fill the Account Name from the Account record to the new field on the Contact record.

For any questions, please contact us -

Feedback and Knowledge Base