Used this code to get PicklistEnry list from field and get Label from it:
DescribeFieldResult res = Organization.getSObjectType().getDescribe().fields.getMap().get('OrganizationType').getDescribe();
List<PicklistEntry> entries = res.getPicklistValues();
for (PicklistEntry entry : entries) {
System.debug(entry.getValue() + ' : ' + entry.getLabel());
}
It worked yesterday, but today I'm getting null for labels:
05:56:41.13 (29155386)|USER_DEBUG|[5]|DEBUG|Team Edition : null
05:56:41.13 (29290993)|USER_DEBUG|[5]|DEBUG|Professional Edition : null
05:56:41.13 (29398823)|USER_DEBUG|[5]|DEBUG|Enterprise Edition : null
05:56:41.13 (29535199)|USER_DEBUG|[5]|DEBUG|Developer Edition : null
05:56:41.13 (29681282)|USER_DEBUG|[5]|DEBUG|Personal Edition : null
05:56:41.13 (29809578)|USER_DEBUG|[5]|DEBUG|Unlimited Edition : null
05:56:41.13 (29944321)|USER_DEBUG|[5]|DEBUG|Contact Manager Edition : null
05:56:41.13 (30078120)|USER_DEBUG|[5]|DEBUG|Base Edition : null
The question:
Was there any update that SF released without notification? I have checked OrganizationType
from Organization
standard object on several orgs, but result is the same.
UPDATE:
I have logged a case (28390515) with SF Support for this issue, will update question soon.
OrganizationType
field onOrganization
object. Looking up the picklist entry details for this field in Salesforce Inspector or Workbench, the label is actually empty. I've never tried to query the label for the picklistentries of this particular field before. May be this is default set-up/ behaviour of this particular field. Fetching the labels on all other (most) picklist field entries is working fine.