Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

How to convert from 18 Digit Salesforce ID to 15 Digit ID Using Apex Class

Be First!
by March 8, 2014 APEX, SALESFORCE

How to convert from 18 Digit Salesforce ID to 15 Digit ID Using Apex Class

Its possible to convert from 18 Digit Salesforce ID to 15 Digit ID Using String Function Called ‘Substring’ and see the below Example for your reference:


String AccountId = ‘00111000009lpABAAY’;
String Accountid15Digit = AccountId.substring(0, 15);
system.debug(’15 Digit Account ID”+ Accountid15Digit);


For More Details see the below Link:

http://www.salesforce.com/us/developer/docs/dbcom_apex250/Content/apex_methods_system_string.htm

(4428)

Previous
Next

Leave a Reply