function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SAHG-SFDCSAHG-SFDC 

Is there a way to call a flow when drop down value is chosen

Hi,

I am trying call a flow when a user edit a lead records, When a lead record is edited  to change the value of picklist, It should allow the user to change the value for other two fields as well (One is pick list and other is a free form text field) both are custom fields

I have a created a flow for meeting this requirement, Challenge is how to call the flow when the user edits the record? , We can't add button , OnclickJavascript was easier
Best Answer chosen by SAHG-SFDC
Mark GuildayMark Guilday
Maybe I'm just not fully understanding what you are trying to do. This is what I imagined you were asking and if I'm wrong maybe you can clarify for others that want to help.

You have a picklist on the lead and when the rep/user updates that field you want this flow to fire which updates these other two fields, correct?

I'm thinking my view of your issue is too simple but if that scenario is correct you would just have the process fire everytime the record is edited to meet criteria and then put IsChanged(Picklist_Field__c) as the formula criteria. 

When I read your post I originally thought that maybe you were trying to do something really advanced that can be done declaratively but I'm by no means an expert in code, visualforce, anything like that.

Good luck!
 

All Answers

Mark GuildayMark Guilday
Can't you just use process builder? Same kind of deal as normal workflow but I'm almost positive you can call a flow using PB.
SAHG-SFDCSAHG-SFDC
Yes, I tried with PB, How do I give users option to choose from the drop down, I can't set a value for them 
Mark GuildayMark Guilday
Maybe I'm just not fully understanding what you are trying to do. This is what I imagined you were asking and if I'm wrong maybe you can clarify for others that want to help.

You have a picklist on the lead and when the rep/user updates that field you want this flow to fire which updates these other two fields, correct?

I'm thinking my view of your issue is too simple but if that scenario is correct you would just have the process fire everytime the record is edited to meet criteria and then put IsChanged(Picklist_Field__c) as the formula criteria. 

When I read your post I originally thought that maybe you were trying to do something really advanced that can be done declaratively but I'm by no means an expert in code, visualforce, anything like that.

Good luck!
 
This was selected as the best answer
Mark GuildayMark Guilday
The users should be able to use the picklist that is being updated from the flow. It would only be locked if it's a formula field, or you have restricted it on the page layout or validation rules.
SAHG-SFDCSAHG-SFDC
Thanks Mark