Get Key Prefix of Salesforce Object
Biswajeet
September 13, 2017 No Comments on Get Key Prefix of Salesforce Object
Let’s say we have a custom object “Customer__c”, and we want the Key Prefix of this object.
Using Apex:
String keyPrefix result = Customer__c.SObjectType.getDescribe().getKeyPrefix(); System.Debug('Key Prefix: ' + keyPrefix);
Using Workbench:
Login to Workbench || Info || Standard & Custom Objects || Select one object from the picklist || Expand Attributes