Tag Archives: Prefix of Object

Get key prefix of an object using Apex

Every record in Salesforce has an ID which is used to uniquely identify the record. Each ID value is globally unique. The first three digits represent the object type. For example, the Account object uses the 001 prefix; the Note object uses the 002 prefix, Contact uses 003, Users 005, Opportunity 006 etc. We can… Read More: Get key prefix of an object using Apex »

Get Key Prefix/Object id of Object in JavaScript

Few days back, while working on a project we needed to have a Key Prefix of our Object called Client__c in our JavaScript code for further processing. We didn’t want to hard code Key Prefix of Client__c. The reason is that when we deploy our package for different Organizations, Key Prefix would automatically get created.… Read More: Get Key Prefix/Object id of Object in JavaScript »