In this blog, we will explore how to create a record-triggered flow to automate the mapping of picklist fields between parent and child records in Salesforce. i.e.: How to map a Parent Record’s Picklist value to a Child Record using a Flow when creating the Child Record. Our focus will be on ensuring that when a new Contact is created, a picklist field on the Contact record automatically inherits the corresponding value from its parent record, such as an Account.
Record-Triggered flow to Automate the mapping of picklist
Here are the Step-by-Step Guide to creating the record-triggered flow to automate the mapping of picklist
- Understanding the Requirement
- When a Contact is created, we want to automatically populate the picklist field (LeadSource) on Contact with the same value that exists in a corresponding picklist field (AccountSource) on the Contact’s related Account. i.e.: need to create a record-triggered flow to automate the mapping of picklist.
- Prerequisites
- Ensure you have the necessary permissions in your Salesforce org to create flows. Understand the data model: Contacts are related to Accounts through a lookup or master-detail relationship.
- Create a Record-Triggered Flow:
- Navigate to Setup in Salesforce.
- In the Quick Find box, type Flows and select Flows under Process Automation.
- Click New Flow and select Record-Triggered Flow.
- Name your flow (e.g., “Map Account Picklist to Contact”).
- Define the Flow Logic
- Object: Choose Contact as the object for which the flow will be triggered.
- Start the Flow: Trigger the flow when a record is created.
- Criteria: Add entry conditions to filter the flow should be triggered (e.g., only when a new Contact has associated Account).
- Optimize the flow for: Fast fields Updates as we are setting the value of a field before saving the record.
- Get Related Account’s Picklist Value i.e.: record-triggered flow to automate the mapping of picklist
- Get Records:
- Get the Account record based on the contact’s AccountId field by setting the condition. Retrieve only the first value.
- Check if the retrieved account has the value in its picklist field. And then proceed to assign the value to contact.
- Assign Picklist value
- Assign the AccountSource(picklist) value of Account to the LeadSource(picklist) value of Contact.
- Activate and Test the Flow of the record-triggered flow to automate the mapping of picklist
- Once the flow is configured:
- Save your changes and activate the flow.
- Test the flow by creating a new Contact and ensure that the picklist field on the Contact gets populated with the corresponding value from its related Account.
- Considerations
- Error Handling: Add error handling and fault paths to handle scenarios where the Account might not have a value in the picklist field.
- Bulk Processing: Ensure your flow handles bulk records correctly, especially if you’re processing multiple Contacts simultaneously.
By following the above blog instructions, you will be able to learn “How to create a record-triggered flow to automate the mapping of picklist ie.: how to map a Parent Record’s Picklist Value to a Child Record using a Flow when creating the Child Record“.
If you still have queries or any related problems, don’t hesitate to contact us at salesforce@greytrix.com. More details about our integration product are available on our website and Salesforce AppExchange.
We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at salesforce@greytrix.com.
About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.
Greytrix has some unique solutions for Cloud CRM such as Salesforce Sage integration for Sage X3, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support business partners and end users.
Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star rated app listed on Salesforce AppExchange.
The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.
For more information on our Salesforce products and services, contact us at salesforce@greytrix.com. We will be glad to assist you.
Related Posts