Friday, September 16, 2011

Obscure Salesforce object key prefixes

This is a reference to some common and more obscure Salesforce key prefixes that I've encountered.

Key PrefixObject Type
001Account
02ZAccountContactRole
00rAccountShare
04mAdditionalNumber
01pApexClass
099ApexComponent
07LApexLog
709ApexTestQueueItem
07MApexTestResult
066ApexPage
01qApexTrigger
806Approval
02iAsset
01QAssignmentRule
707AsyncApexJob
00PAttachment
016BrandTemplate (Letterhead)
01mBusinessHours
019BusinessProcess
04vCallCenter
701Campaign
00vCampaignMember
01YCampaignMemberStatus
08sCampaignShare
500Case
00aCaseComment or IdeaComment
Use caution as there are at least two object types exposed via the partner API with the same keyPrefix!
03jCaseContactRole
01nCaseShare
010CaseSolution
02oCategoryData
02nCategoryNode
09aCommunity
003Contact
03sContactShare
800Contract
02aContractContactRole
08eCronTrigger
01ZDashboard
01aDashboardComponent
015Document
05XDocumentAttachmentMap
093EmailServicesAddress
091EmailServicesFunction
018EmailStatus
00XEmailTemplate
00UEvent
020EventAttendee
022FiscalYearSettings
00lFolder
608ForecastShare
00GGroup
011GroupMember
0C0Holiday
087Idea
00aIdeaComment or CaseComment
Use caution as there are at least two object types exposed via the partner API with the same keyPrefix!
00QLead
01oLeadShare
0YaLoginHistory
01HMailmergeTemplate
002Note
006Opportunity
00JOpportunityCompetitor
00KOpportunityContactRole
008OpportunityHistory
00kOpportunityLineItem
00oOpportunityLineItemSchedule
Represents information about the quantity, revenue distribution, and delivery dates for a particular OpportunityLineItem.
Products, Price Books, and Schedules Overview
00tOpportunityShare
0D2OrgWideEmailAddress
00DOrganization
00IPartner
Also OpportunityPartner, which "is automatically created when a Partner object is created for a partner relationship between an account and an opportunity"
00qOpportunityTeamMember - "This object is available only in organizations that have enabled team selling."
026Period
01sPricebook2
01uPricebookEntry
04gProcessInstance
04hProcessInstanceStep
04iProcessInstanceWorkitem
01tProduct2
00eProfile
03gQueueSobject
012RecordType
00OReport
01NScontrol
035SelfServiceUser
501Solution
081StaticResource
00TTask
005User
100UserLicense
03uUserPreference
0D5UserProfileFeed
00EUserRole
00pUserTeamMember
01DUserAccountTeamMember
083Vote
00bWebLink - Custom Button or Link
00BView
0E8EntitySubscription
0D5FeedItem or NewsFeed or UserProfileFeed
Use caution as there are at least three object types exposed via the partner API with the same keyPrefix!
058ContentWorkspace
059ContentWorkspaceDoc
069ContentDocument
068ContentVersion
033Package - being built in the developer org
04tInstall Package
0A3Installed Package
092Weekly Data Export
00SImport Queue
07ESandbox
07MApex Test Result
0A2Change Set
0EPInbound Change Set?
00NCustom Field Definition - Setup > Create > Objects > [Your Object] > [Your Field]
CF00NCustom Field Id using in the query string. Note the keyprefix isn't actually CF0. In this case "CF" has been appended to the "00N" of the Custom Field Definiton.
0BMConnection - Salesforce to Salesforce
01rVisualforce Tab
101Custom Label
03dValidation Rule
01QWorkflow Rule
000Empty Key
0Q0Quote
01ICustom Object
04sAsyncResult, DeployResult
00hPage Layout
082Data from Uninstalled Packages? A zip containing CSVs.
04kOutbound Message Id
04lOutbound Notification Id
060Portal Id
7tfTraceFlag
0DMSite
0J0SetupEntityAccess
888Remote Access
1dcMetadataContainer from the Tooling API
1drContainerAsyncRequest from the Tooling API
02cSharing Rule
750Bulk Query Job
751Bulk Query Batch
752Bulk Query Result
0PSPermission set metadata
04YField Update
400ApexClassMember

RegEx to validate Salesforce Id

[a-zA-Z0-9]{15,18}

4 comments:

  1. Great reference (especially for URL hacking)

    ReplyDelete
  2. Wow, great compilation. I was searching for a list since forever. Thanks :)

    ReplyDelete
  3. Thanks for the list. Does Salesforce modify this?

    ReplyDelete
    Replies
    1. I maintain this list personally. The key prefixes are pretty much constant.

      If you have any additions or corrections please let me know.

      Delete