+ Start a Discussion
have questionshave questions 

mapping 18 character or 15 character record ID?

Hi, I am having trouble about the mapping the correct record ID. I got a 18 character case-insensitive id field value for account by using Table query, but when I want to use this 18 character to update a field in a record in a custom object (purchase requisition), it will only pick the first 15 character and update the record with a wrong account name.
How to correct this?

Ron HessRon Hess

Q: to update a field in a record in a custom object

What type and length is the field in the custom object?



Every record into salesforce has a unique ID whatever it is 18 or 15 charcter long. Please remember first 15 characters is actually unique in nature.

Please varify once again your update query.

if still problem persists than provide me detail info, what exectly you are doing?


Sunil Prasad

have questionshave questions
Hi, just tried today again. It works now. But I dont know why it did not before.
What I am trying to do is customizing the procurement app from appexchange. I have a database "purchase items" which has a field "preferred vendor", this field is a lookup field from "Account". So I was trying to use the "Account" ID to update the "Preferred Vendor" field using vlookup.
Weird things did happen. I also tried the data loader to insert new record, but I got an error msg saying that the value for a currency field is not correct. So I tried to use Sforce connector.

You may want to add a formula field that does the calculation, and include this formula field in your reports: see http://community.salesforce.com/t5/Apex-Code-Development/Formula-Field-calculating-the-18-digit-ID-from-the-15-digit-ID/td-p/189848 for details.

Hope this helps,

Ad CadAd Cad
I know this is an old post, but just in case it is useful to someone, if you want to do ad-hoc conversions of Id's, rather than programatically, then this Chrome extension makes it easy:

FYI - I'm the developer. Please use the feedback form on the app if you'd like to suggest any improvements or additional functionality.