Solution: We just need to declare a variable of type Id and then assign the 15 digit number to that variable.
Example:
String s15DigitLeadId = '00Q0o00001OoyzD'; //Assume this is record Id of Lead of 15 digits
Id i18DigitId = s15DigitLeadId;
system.debug('Eight Digit Id:'+i18DigitId);
Output: Eight Digit Id:00Q0o00001OoyzDEAR
Example:
String s15DigitLeadId = '00Q0o00001OoyzD'; //Assume this is record Id of Lead of 15 digits
Id i18DigitId = s15DigitLeadId;
system.debug('Eight Digit Id:'+i18DigitId);
Output: Eight Digit Id:00Q0o00001OoyzDEAR
No comments:
Post a Comment