What are some use cases for using the schema class?
Answer Posted / 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 View All Answers
Will data be lost in a custom field if data type is changed to number from any other data type?
Write a syntax and structure of scheduler class?
How can you create many to many relationship in salesforce ?
How do you unit test a trigger when you don’t know the required fields?
When should we use component event and application events?
What are static resources? : salesforce visualforce
What happens to detail record when a master record is deleted?
What is a custom report type? : salesforce reports and dashboards
What are custom labels in the salesforce? What is the character limit of custom labels?
Explain the force.com platform?
What is custom controller? : salesforce visualforce
Differentiate between Profile Vs Permission Sets Permissions and Access Settings?
List things that can be customized on page layouts?
If I want to Insert, Update any record into 'Account'. What trigger I have to use?
What are various standard exceptions that salesforce throws?