You need to sign in to do that
Don't have an account?

How do i assign a picklist value to string
Hi, need help with assigning a picklist value to a string. Something like this
Reference_Key2__c = TEXT(Dispute_New__c.Status__c)
where 'status__c' is a pick list and Reference_Key2__c is a string.
All you need to do is assign it to a String variable. It's stored as a String.
Reference_Key2__c = Dispute_New__c.Status__c;
All Answers
All you need to do is assign it to a String variable. It's stored as a String.
Reference_Key2__c = Dispute_New__c.Status__c;
Hey,
Are you trying to do this in a formula field or in apex code?
If it is a formula field then the formula you want is TEXT(Dispute_New__c.Status__c).
If it is in apex code, then retrieveing the alue from a single select picklist should return as a string.
Paul
This is in apex
Hi, thanks to the thread.
the simple assignment in apex did not work.
any solved like this :
I have this is the constructor :
and this for the assingment :
Also added this to provide a default value :