Hi All, Sometimes it may require to know the recordtypeid and recordtypename of an object in apex class.This is post is all about to make you comfortable with Recordtype methods.I am assuming you have concept of recordtype. Below is few code snippet to make you comfortable with recordtype method. RecordTypeInfo is a class contains methods for accessing recordtype information for an sObject with associated recordtype. getRecordTypeInfosByName(); - Returns maps that associate RecordTypeInfo with record labels. getRecordTypeInfosById();- Returns maps that associate RecordTypeInfo with record Id. getname():- Returns recordtype name. getRecordTypeId() :- Returns recordtype id. isAvailable() :-Returns true if this record type is available to the current user, false otherwise isDefaultRecordTypeMapping() :-Returns true if this is the default record type mapping, false otherwise. Here Contact is the standard object and Service Contact is the recordtype name. Sch...
A place where you have to land for exploring Salesforce