
Salesforce CRM has many data types for fields to store various data like name, date of birth, work location, email, and mobile number. We can utilize these fields to automate processes based on our needs. Here, we will discuss a specific use case wherein one of our clients wanted to store the campaign names in a particular format related to the lead. Using standard screens, one can view the number of campaigns in this lead in related lists and related quick links, but here the requirement was adding the name of all campaigns to this lead. The team researched various approaches along with corresponding limitations. For instance, text or text area data type has limitations over characters. Finally, the consensus was to use a multi-picklist to overcome limitations with other data types:
Wondering how? Let us dive deep into the step-by-step process of setting this up.
Use Case:
Whenever a campaign happens for a lead, the campaign name has to appear on the lead record detail page.
1. Go to setup
2. Click on the object manager and search for the lead object.
3. Go to the Fields and Relationships section of the lead and click on the new button.
4. Choose Multi picklist as the data type and give the label as Campaign

5. Save the field by giving the ‘None’ as a picklist value.

6. Login to the org and go to flows. Click on create a new flow.

7. Choose record triggered flow
8. Choose Campaign Member as the object, configure trigger when there is creating of a record or updation, and ensure the flow optimization for Action and Related Records.

9. Use the Get Records element to fetch the lead records where the Id of the lead matches with the Campaign member record’s Lead Id. Store all the records

10. Use the Loop element to loop over the fetched records.

11. Use the current loop variable to fetch the field to update with the campaign name.

12. Use the update element to commit the changes to the database, which now contains the multiple values of the campaigns at a single place on the lead record detail page.

13. The output is as follows:

Authors:
2. Priyanka Mondal
For more updates regarding Salesforce or if you are looking for any Salesforce consultancy services, Contact ABSYZ Inc. at +1.415.364.8055 or +91 79979 66174. Visit our website at https://absyz.com/