Google adds

How we Get a 18 character ID from a 15


            When a user pulls information containing the id from the API, the id contains 18 characters. On the other hand, if the user looks at the id in the Reports tab or the Weekly Export Service, the id will only contain 15 characters.


To convert a 15 char case-sensitive id to an 18 char case-safe id follow these steps:

1. Split the 15 char into 3 chunks of 5 chars each.

2. Reverse the chunks

3. For each character give that position a value of 1 if uppercase, 0 otherwise (lowercase or number).

4. Now convert from those bits to a character using a lookup table.

5. Append the resulting 3 characters, in chunk order, to the end of the 15 char id.

No comments:

Post a Comment

All Governor Limit

Number of SOQL queries: 100 Number of query rows: 50,000 Number of SOSL queries: 20 Number of DML statements: 150 Number of DML rows: 10,...