Generate Unique Ids
Generate Unique Id in Apex
Starting from the Spring ’24 release, you can generate UUIDs (Universal Unique Identifiers) in Apex.
Starting from the Spring ’24 release, you can generate UUIDs (Universal Unique Identifiers) in Apex.
Use the new UUID class for that
apex
UUID uniqueId = UUID.randomUUID();
System.debug(uniqueId);
yourCrazyMethodAssigningIds(uniqueId.toString());

