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
Yogesh K MishraYogesh K Mishra 

How to set some text in custom field when the picklist value changes one value to another?

How to set some text in custom field when the picklist value changes one value to another?  Suppose there is 4-5 values in picklist and when the value of picklist is changing from 1 to 2 or 1 to 3 or 1 to 4 then set some text into custom field suppose A, same if picklist value chaning 2 to 3 or 2 to 4 then set B in custom field.
If anyone know the solution please share, Appriciated..
ANUTEJANUTEJ (Salesforce Developers) 
Hi Yogesh,

>> https://trailblazers.salesforce.com/answers?id=9063A000000Dw2JQAS

>> https://salesforce.stackexchange.com/questions/169096/update-field-values-based-on-picklist-change

I found these two implementations that are similar that you can try checking, above are the links for the same.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
MichelCRMichelCR
Hi Yogesh,

The easiest way could be using a Process Builder, and the logic to determine if a Picklist change the value from A to B can be:

AND(
ISPICKVAL(PRIORVALUE(PicklistField__c),"A"),
ISPICKVAL(PicklistField__c,"B"))
)

then in the actions, you can set your text in the custom field.

I hope this helps!