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 authentication access types for a force.com canvas application?

0 Answers  


When to use public class and when to use global class?

0 Answers  


What happens to detail record when a master record is deleted? What happens to child record when a parent record is deleted?

0 Answers  


What is s-control?

0 Answers  


What happens with existing visualforce pages in lightning experience?

0 Answers  


How can I participate in the developer force community?

0 Answers  


What is role hierarchy? : salesforce sharing and security

0 Answers  


Why is it necessary for most sales teams to use both leads and contacts?

0 Answers  


What is the difference between soql and sosl query ?

0 Answers  


What is the use of triggers in salesforce?

0 Answers  


Are there any css (styles) provided by salesforce.com as part of the supported lightning components ? : salesforce lightning component

0 Answers  


Mention what are the actions available in workflow?

0 Answers  


Categories