Skip to content

Instantly share code, notes, and snippets.

@Sunil02kumar
Created October 27, 2018 08:54
Show Gist options
  • Select an option

  • Save Sunil02kumar/5406ae2db9e536ea9407886667142236 to your computer and use it in GitHub Desktop.

Select an option

Save Sunil02kumar/5406ae2db9e536ea9407886667142236 to your computer and use it in GitHub Desktop.
retrieve all recordtype information for account object
Map<string,Schema.RecordTypeInfo> ss= Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName();
system.debug('****ss:'+ss);
for(string rt:ss.keyset()){
Schema.RecordTypeInfo rtpeInfo=ss.get(rt);
system.debug('****getDeveloperName:'+rtpeInfo.getDeveloperName());
system.debug('****getName:'+rtpeInfo.getName());
system.debug('****getRecordTypeId:'+rtpeInfo.getRecordTypeId());
system.debug('****isActive:'+rtpeInfo.isActive());
system.debug('****isAvailable :'+rtpeInfo.isAvailable());
system.debug('****isDefaultRecordTypeMapping :'+rtpeInfo.isDefaultRecordTypeMapping());
system.debug('****isMaster :'+rtpeInfo.isMaster());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment