You need to sign in to do that
Don't have an account?
Stavros McGillicuddy
Copy a picklist value to a text field need syntax
I am trying to copy a picklist value to a text field with a custom button but can't figure out the syntax.
This syntax populates the field with
TEXT(!Opportunity.AVSFQB__Generate_Object__c)
Thank you
This syntax populates the field with
TEXT(!Opportunity.AVSFQB__Generate_Object__c)
record.Sample_Generate__c = 'TEXT(!Opportunity.AVSFQB__Generate_Object__c)';
Thank you
record.Sample_Generate__c = '{!Opportunity.AVSFQB__Generate_Object__c}';
All Answers
record.Sample_Generate__c = '{!Opportunity.AVSFQB__Generate_Object__c}';
I assume you are writing this in formula field.
If so then you write as below
if in the apex
If it is in Apex code, then retrieving the value from a single select picklist should return as a string. For example, the country is picklist and values in the picklist like India; the US are always strings that means (Text) you can directly assign to a string variable.
This is what worked for me