I have picklist field and I need to get in the trigger both old and new translated values. I can query the new value from the record:

Lead lead = [select id, tolabel(status) from Lead where id = :leadId];

But i still haven't find a way to get the old translated value.

  • you can get the old values in trigger.old, list of the old versions of the sObject records. but this sObject list is only available in update and delete triggers. And you can use trigger.oldMap also.
    – Safiya PV
    Commented Apr 2, 2017 at 11:57
  • The value in trigger (old or new) is the API name. To get the translated value I need to query it, however query give me only the new translated value.
    – Liron C
    Commented Apr 2, 2017 at 12:03

1 Answer 1


In Apex, picklist fields on objects are just plain strings, and lack a method to get the label.

You also can't query the previous state of the database.

You will have to use the system describe methods to get the Schema.PicklistEntry values for your field, and use them to associate the api values in the trigger context variables with the labels from the describe call.

// Use the describe information to generate a mapping from api name to label
list<Schema.PicklistEntry> PicklistEntries = Lead.Status.getDescribe().getPicklistValues();
map<String,String> ApiToLabel = new map<String,String>();
for (Schema.PicklistEntry pe : PicklistEntries){

// use the map to get the label from the api values in the trigger context variables
for (Lead l : trigger.old){
    system.debug('api value: ' + l.Status);
    system.debug('label: ' + ApiToLabel.get(l.Status));

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .