Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Id objectRecordTypeId = Schema.SObjectType.CustomObject__c.getRecordTypeInfosByName().get('CustomObject').getRecordTypeId();
Refer the below blog,
http://manojjena20.blogspot.in/2015/08/how-to-get-recordtypeid-in-apex-without.html
Thanks,
Vijay
Try below sample code. Here API Name of object is "CustomObject__c" and object name is "CustomObject".
Thanks,
Gaurav