function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
plpl 

object id

Hi,

I am running Axis demo(java). After I insert a account , I got "insert new account, id : 00130000000hFkU, ...

 

But when I do query, I got " field : id has the value of 00130000000hFkUAAU.

 

There are 3 chars append to the id. I am wondering why. Anybody else notice this behaior ?

 

Thanks.

DevAngelDevAngel

Hi pl,

This is from the documentation:

For all entity types, every record has an id field that uniquely identifies that record. The value for the id field is created automatically upon insert, and it cannot change over the lifetime of that record, even if the record is deleted and then undeleted. Each id value is guaranteed to be globally unique. The id of a record is the best way to uniquely identify that record.

In API versions prior to 2.0, the id of a record is always a 15 character case-sensitive ID and should not be compared in a case-insensitive manner.

In API versions 2.0 and higher, the API can return either a case-sensitive or a case-insensitive id field value. The case-insensitive ID is identical to the 15 character case-sensitive ID with three extra characters appended to indicate the case of each of the original 15 characters. When inserting or updating records, the API accepts either the 15 character case-sensitive ID or the 18 character case-insensitive ID. When querying or searching records using the API, you must specify a value of �1� for the �useCaseSafeIDs� parameter to indicate that you want the API to return case-insensitive IDs. If you do not specify the �useCaseSafeIDs� parameter, you automatically receive case-sensitive IDs.

The ID of a record also indicates what type of entity it is. This is useful for the search response that returns a list of record IDs but does not include the entity type for each record (see The search Response for more information). Every record ID begins with a three character code that identifies the entity type. The three character codes are:

Codes to Determine Entity Type
Entity Type Code Entity Type Code
account 001 opportunity 006
accountShare 00r opportunityContactRole 00K
attachment 00P opportunityLineItem 00k
campaign 701 opportunityLineItemSchedule 00o
campaignMember 00v opportunityShare 00t
case 500 opportunityTeamMember 00q
caseSolution 010 partner 00I
caseComment 00a pricebook 00i
caseHistory 017 product 00j
contact 003 profile 00e
customFieldDefinition 00N profileRecordType 014
document 015 recordType 012
event 00U recordTypePicklist 013
folder 00l role 00E
group 00G solution 501
groupMember 011 task 00T
lead 00Q user 005
note 002 userTeamMember 00p

plpl

Thanks a lot

 

peilei

Scott BScott B

Can you pls post a sample for this useCaseSafeId param?  I don't see it anywhere in the very latest sforce 2.5 pdf, which I downloaded today.

 

 

DevAngelDevAngel

Hi Scott B,

2.5 defaults to 18 chars on the ID (case safe) and provides not option to use the 15 character ID explicitly.