Salesforce interview Question
Please find below Salewsforce Interview Question which is ask in many interviews. 1) How to get the RecordType/Id name based on the ID? Ans: Use following methods to get recordtype Name or Id based on the parameters passed to these methods. public static Id getRecordTypeIdbyName(String objectName, String strRecordTypeName) { return Schema.getGlobalDescribe().get(objectName).getDescribe().getRecordTypeInfosByName().get(strRecordTypeName).getRecordTypeId(); } public static String getRecordTypeNameById(String objectName, Id strRecordTypeId) { return Schema.getGlobalDescribe().get(objectName).getDescribe().getRecordTypeI...