DocSF

DocSF

Did You Know?

Docy turns out that context is a key part of learning.

How Generate Unique Id (15 digit) for Salesforce

Blob b = Crypto.GenerateAESKey(128);
         String h = EncodingUtil.ConvertTohex(b);
         String guid = h.SubString(0,8)+  h.SubString(8,12) +  h.SubString(12,15);
         system.debug(guid);

Other Example

String hashString = '1000' + String.valueOf(Datetime.now().formatGMT('yyyy-MM-dd HH:mm:ss.SSS'));
Blob hash = Crypto.generateDigest('MD5', Blob.valueOf(hashString));
String hexDigest = EncodingUtil.convertToHex(hash);
system.debug('##########' + hexDigest );

Related Post

Continuous delivery definition

 It aims at building, testing, and releasing softw...

Pacchetto digitale antievasione

Sprint nella lotta all'evasione: il governo in vista de...

Regulation ICO e l’adozione delle cript

Giappone: passi avanti su regulation ICO e adozione cri...

Leave a Comment