Hi i will get 18 digit recordId in batch apex..But i have 15 digit Id.When id tried to compare both ids getting null value.How to get 15 digit id from 18 digit id.
String id = 'a0P4E0000030HzNXAU';
i need only 'a0P4E0000030HzN'
Hi i will get 18 digit recordId in batch apex..But i have 15 digit Id.When id tried to compare both ids getting null value.How to get 15 digit id from 18 digit id.
String id = 'a0P4E0000030HzNXAU';
i need only 'a0P4E0000030HzN'
Best Answer
The following should work:
Signature
Returns a new String that begins with the character at the specified zero-based startIndex and extends to the character at endIndex - 1.
Parameters
startIndex Type: Integer
endIndex Type: Integer
Return Value Type: String