Activity › Forums › Salesforce® Discussions › How do you get the recordTypeId in Salesforce apex? Salesforce® Discussions How do you get the recordTypeId in Salesforce apex? Posted by Shweta on September 9, 2020 at 2:06 PM How do you get the recordTypeId in Salesforce apex? Anuj replied 5 years, 8 months ago 3 Members · 2 Replies 2 Replies Anjali Member September 10, 2020 at 6:13 AM Please refer the below link- https://developer.salesforce.com/forums/?id=906F0000000937iIAA [adinserter block='9'] Anuj Member September 10, 2020 at 1:32 PM You Can directly query the RecordType by using name of recordType in Apex . For e.g. [select id from Recordtype where Name=’recordtype name’]. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me