String recordId = '01I20000000VyKGAAN'; Id newId = Id.valueOf(recordId);
Note: Here String recordId
should be a valid record id. Salesforce Id is system generated Id and we cannot generate it.
String recordId = '01I20000000VyKGAAN'; Id newId = Id.valueOf(recordId);
Note: Here String recordId
should be a valid record id. Salesforce Id is system generated Id and we cannot generate it.