adspace


How to get the picklist value in apex class?

Answer Posted / Ravi Kumar Ravi

To retrieve the selected value of a Picklist field in an Apex Class, you can use the 'get()' method. For example, if your SObject variable is named myRecord and the Picklist field is named myPicklistField, you can get its value by using: String picklistValue = myRecord.myPicklistField__c.get();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is workflow rule and workflow actions? : salesforce workflows and approval process

579


What were you doing before sfdc development?

524