Get Record Type Info, Id, Name, Dev Name using Schema SF

cafeforce
cafeforce 2.2k Views Add a Comment

Record Type related all methods can be accessed through Schema easily. These methods are part of the RecordTypeInfo Apex class. Before using these methods, ensure that you use the correct Object Name in Schema.

Check if Record Type is Active:

Fetch RecordType Id from RecordType Name:

Fetch RecordType Id from RecordType Developer Name:

Fetch RecordType Name from RecordType Id:

Fetch RecordType Name from RecordType Developer Name:

Fetch RecordType Developer Name from RecordType Id:

Fetch RecordType Developer Name from RecordType Name:

Check if RecordType is Master RecordType:

The master RecordType is the default one that’s used when a record has no custom record type associated with it.

To get More Info about RecordTypeInfo class, Click Here

 

Also Check:

For any queries or suggestions, comment below.

Cheers … Happy Coding … 🙂

TAGGED:
Share This Article
Leave a comment
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments