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
Eyal_WizEyal_Wiz 

Workflow Rule

Hi All
 
I've created a new custom field inside the opportunity object, this custom field is a picklist.
I'm trying to create the following workflow: when an opportunity is created or edited i want to update the opportunity name with the value that was choosen in this picklist.
 
I've created a workflow that runs after opportunity is created/changed and created a new workflow action in which i'm trying to update the opportunity name. the problem is that when i'm trying to select this picklist name i'm getting the following error:
 
Error: Field Generic_Class_Type__c is a picklist field. Use it with an ISPICKVAL() or CASE() function instead.
 
I don't understand why should i use ISPICKVAL, i only want the opportunity name to be updated with the value that was selected in this picklist (no matter what that value is).
 
Thanks Alot for your help
Eyal
SubMensaSubMensa
Salesforce does not recognize the contents of a Picklist as being text, except when using it within a CASE() or ISPICKVAL() function. This is a major issue currently, which has caused many of us to pull our hair out. In this situation your best option is to use a CASE() function.

Example:

CASE(  Generic_Class_Type__c ,
  "Option 1" , "Option 1" ,
  "Option 2" , "Option 2" ,
  "Option 3" , "Option 3" ,
  "Option 4" , "Option 4" ,
  ""
)

 
The above would try to match the current contents of the Generic_Class_Type__c field, returning a text strung that matches.
Eyal_WizEyal_Wiz
Wow, it's pretty absurd that they developed so many cool and sophisticated features but missed this basic thing.
 
Thank you very much for your help!
 
Eyal