1

Hi I need to access recordtype details for case Object using DeveloperName. Is there any way I can get complete record type details using schema.getGlobalDescribe method? Or is there any other way to fetch this without using SOQL.

I wrote a piece of code

System.debug(Schema.getGlobalDescribe().get('Case').getDescribe().getRecordTypeInfosByName());

This call doesn't give DeveloperName. Please suggest.

Thanks

1
  • Why would you need the Developer Name? Commented Nov 14, 2015 at 22:16

2 Answers 2

1

You have to use query and create Map. There is no way to get DeveloperName form Schema class...

3
  • Maybe any examples / docs? Commented Mar 13, 2015 at 8:57
  • Sorry I wasn't able to find any direct note that Schema CAN'T return DeveloperName. And I see it as pointless to link documentation about Schema class which @Phaniraj3107 obviously know. My answer is based on my experience only. Commented Mar 13, 2015 at 9:05
  • @ArturKępczyński I think what was meant was to post an example of the way to do it
    – Eric
    Commented Dec 30, 2015 at 14:09
0

There is a case submitted to Salesforce related to this topic. To sum up you cannot do it without SOQL.
https://success.salesforce.com/ideaView?id=08730000000K9zoAAC

You must log in to answer this question.

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