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 are the pros and cons when using a workflow rule field update vs. A formula field?

0 Answers  


How to read text between tags ? : salesforce integration

0 Answers  


What is the difference between profiles and roles in salesforce.com?

0 Answers  


Can a standard object become child in master detail relationship? : salesforce objects & fields

0 Answers  


What are the various ways of deployment in salesforce?

0 Answers  






Which are the possible ways to search within salesforce?

0 Answers  


What is lightning connect ?

0 Answers  


What is the object in salesforce.com?

0 Answers  


Define field types in salesforce?

0 Answers  


Throw some light on implementing pagination in a visualforce page.

0 Answers  


Explain the salesforce dashboard?

0 Answers  


What are record types?

0 Answers  


Categories