githubbob42 / mingle2github1

0 stars 0 forks source link

Create a library function for creating a Guid #663

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 413 Create a utility method to create a Guid inside APEX so that we can call it from a trigger.

Note - rluo 05/28/2013 16:14

StringUtility class was added before this mingle card was created. getHexString() is used to create Guid, Job/Ticket tracking number.


private static string getHexString()

    {

        String seed = UserInfo.getUserId() +  string.valueof(System.now().getTime()) + EncodingUtil.ConvertTohex(Crypto.GenerateAESKey(128));        

        Blob bsig = Crypto.generateDigest('SHA1', Blob.valueOf(seed));

        return EncodingUtil.convertToHex(bsig).toUpperCase();        

    }
githubbob42 commented 5 years ago

Story : #644 (Mingle Card: 393)

393 Schema changes for ticket and job