I have a trigger where i am assigning ID to a cusotm field like below -
D.customfield__c = acc.Id;
The ID is coming as 00P28000000EwpjEA0
But i need only 00P28000000Ewpj 15 char. Is there is a way to use substring in apex trigger. I can't use formula field.