Skip to main content
added 2 characters in body
Source Link
Ayub
  • 3.6k
  • 21
  • 33

getRecordTypeInfosByName() looks for Label.

After summer '18 preview, Salesforce is going to support getRecordTypeInfosByDeveloperName()getRecordTypeInfosByDeveloperName() delivered: https://developer.salesforce.com/docs/atlas.en-us.214.0.apexcode.meta/apexcode/apex_methods_system_sobject_describe.htm

Example: (Change your record type developer name in below example)

system.debug(Case.sObjectType.getDescribe().getRecordTypeInfosByDeveloperName().get('Customer_Success_Support').getRecordTypeId());

getRecordTypeInfosByName() looks for Label.

After summer '18 preview, Salesforce is going to support getRecordTypeInfosByDeveloperName() delivered: https://developer.salesforce.com/docs/atlas.en-us.214.0.apexcode.meta/apexcode/apex_methods_system_sobject_describe.htm

getRecordTypeInfosByName() looks for Label.

After summer '18 preview, Salesforce is going to support getRecordTypeInfosByDeveloperName() delivered: https://developer.salesforce.com/docs/atlas.en-us.214.0.apexcode.meta/apexcode/apex_methods_system_sobject_describe.htm

Example: (Change your record type developer name in below example)

system.debug(Case.sObjectType.getDescribe().getRecordTypeInfosByDeveloperName().get('Customer_Success_Support').getRecordTypeId());
Source Link
Ayub
  • 3.6k
  • 21
  • 33

getRecordTypeInfosByName() looks for Label.

After summer '18 preview, Salesforce is going to support getRecordTypeInfosByDeveloperName() delivered: https://developer.salesforce.com/docs/atlas.en-us.214.0.apexcode.meta/apexcode/apex_methods_system_sobject_describe.htm