• Moh_Sarfaraj
  • 0 Points
  • Member since 2020
  • Sr. Salesforce Developer
  • Nagarro India

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

I want to use record Type to limit trigger action. 


Now I use querey to get it my code liks below

string Id = [SELECT id from RecordType where Name ='Someone'].Id;


I also found this page, we could use method to get the Record Type Id to avoid the query.

I still can't understand it.


Is there some simple and easy wayt to get the ID only by Record Type's Name?

Hi All,


I have two questions.


  1. I want to find whether the object is in our organization or not. I want to do this in APEX controller. Is there any method to do that?
  2. After find the object I want to retrieve the fields name of that object. This also want to perform in APEX controller. Is there any method to do that? 

Thanks in Advance!