Hi,
Previously, the developer name was accessible only via SOQL on the RecordType SObject, and not via describe information. Now you can use the following methods to get the developer name.
Previously, the developer name was accessible only via SOQL on the RecordType SObject, and not via describe information. Now you can use the following methods to get the developer name.
- Schema.DescribeSObjectResult.getRecordTypeInfosByDeveloperName()
- Schema.RecordTypeInfo.getDeveloperName()
Sample Codes:
Getting Record Type Id based on Developer Name:
Schema.DescribeSObjectResult resSchema = Department__C.sObjectType.getDescribe();
//getting all Recordtype developer names of Department__c object
Map<String,Schema.RecordTypeInfo> recordTypeInfo = resSchema.getRecordTypeInfosByDeveloperName();
//Getting IT Department Record Type Id by using developer name ''IT_Department"
Id recordTypeId= recordTypeInfo.get('IT_Department').getRecordTypeId();
System.debug('recordTypeId:'+recordTypeId);
Getting RecordType Developer Name based on Name(Label):
Schema.DescribeSObjectResult resSchema = Department__C.sObjectType.getDescribe();
//getting all Recordtype developer names Account
Map<String,Schema.RecordTypeInfo> recordTypeInfo = resSchema.getRecordTypeInfosByName();
//Getting Business Record Type Id by using developer name
String developerName = recordTypeInfo.get('IT Department').getDeveloperName();
System.debug('developerName:'+developerName);
Reference:
https://trailhead.salesforce.com/modules/platform_dev_i_cert_maint_sum18/units/whats_new_platform_devs
As you have now understood the usage of ‘Record and Playback’ tool, the following
ReplyDeleteare the different posts using which you can explore the functioning of ‘Selenium
IDE’
se
lenium Training in chennai
Robotic Process Automation (RPA) is one of the most exciting developments in Business Process Management (BPM) in recent history. Some industry experts believe it may be even more transformational than cloud computing transformational than cloud Automationminds team. (RPA)Automationminds lets you program in (RPA),
ReplyDeleteNice information thank you so much. For more details please visit.
ReplyDeleteSQL DBA Training in Hyderabad
This is a nice article here with some useful tips for those who are not used-to comment that frequently.
ReplyDeleteThanks for this helpful information I agree with all points you have given to us. I will follow all of them.
Java training in Chennai
Java training in Bangalore
Java online training
Java training in Pune
Java training in Bangalore|best Java training in Bangalore
Thanks For sharing Your information The Information Shared Is Very Valuable Please Keep updating Us Time Just Went On Redaing The Article Python Online Course Devops Online Course Data Science Online Course Aws Science Online Course
ReplyDeleteit is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training