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
GaganGagan 

Please Clear!!!

Hi ,

Its been long time since we are working on and with salesforce using Data jucntion, API, and on salesforce.com itself. There is one thing i am not still clear of:

  • Why there is two diffrent kind of Object ID for Sales force Entities.( 15 Chr and 18 Chr)
  • Is there any diffrence using 15 chr and 18 chr ids while using API (specially 2.5 partners)
  • I create task using API2.5 partners, I pass  whoid and whatid as 15 chr. But save result() returns me the ID of the created task in 18 chrs. Why is it so.
  • Is salesforce maintaining two systems of object id. If yes how does it effectsa programmer.

    Please Help in clearing the concept!

Thanx
Gagan

DevAngelDevAngel

Hi Gagan,

This has been discussed before, but I'll mention it again because it is important to understand.

Prior to version 2.0 of the API, all ids where 15 characters and case sensitive.  Based on customer and developer requests, we designed a way to modify the 15 char ids to be case-insensitive by using a special algorithm that adds 3 chars to the 15 char id.  The basis for these requests were that people were exporting salesforce.com data into other systems that would not provide for case-sesitive primary key values easily or at all.

The 2.0 version of the API was modified to allow a developer to specify whether or not he/she wanted the 15 or 18 char ids.  We also have provided the required information for converting a 15 char id to an 18 char id and vice-versa.  As of version 2.5 of the API, 18 char ids are returned from all calls that return an id.  Internally, the ids are always stored in the 15 char equivelant and the web service can accept 15 or 18 char ids.  In the application (salesforce.com) the ids are represented using the 15 char format and will be for the foreseeable future.  There is only one id stored internally and it is the 15 char format.  The 18 char format (a mutation of the 15 char format) is provided as the standard format for ids coming back from the web service. 

You should not need to worry about the id length when using the API.