In summer'18 release, new methods have been introduced through which we can retrieve all recordtype info using describe information. Below are 2 methods introduced in summer'18:
Suppose you want to retrieve all recordtype information for account object then use below code:
Below is console output
Hope this help!!
- Schema.DescribeSObjectResult.getRecordTypeInfosByDeveloperName()
- Schema.RecordTypeInfo.getDeveloperName()
Suppose you want to retrieve all recordtype information for account object then use below code:
Below is console output
Hope this help!!
Thanks, need to test it ASAP
ReplyDelete