What are some use cases for using the schema class?



What are some use cases for using the schema class?..

Answer / apoorva mathur

By using Schema class you can retrieve data from server without SOQL query. for eg- get recordTypeId without soql query

Id contRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('NameOfRecordType').getRecordTypeId();

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What is lightning experience?

0 Answers  


Can a trigger make a call to apex callout method?

0 Answers  


What are the different editions of salesforce?

0 Answers  


What is a workflow? What all are its components?

0 Answers  


How many workflow rules can you create per entity ?

0 Answers  






What is the difference between 15 and 18 Digit ID ?

0 Answers   Cognizant,


How to unit test code which has logic around the created date?

0 Answers  


How to ensure fls while working with lightning component? : salesforce lightning component

0 Answers  


Which is api based tool supported by salesforce and what are its advantages? : salesforce Data Management

0 Answers  


How many visual force pages do you write a day?

0 Answers  


there are two fields if the user populates two field values if we combine those values uniqueness should be maintained, how to achieve this without coding?

0 Answers  


Give an example of a standard object that’s also a junction object?

0 Answers  


Categories