"Generates a GUID that can be used when a unique identifier is required."
personalId = gs.generateGUID();
*** Script: b3b17d8f97f02110df843a300153af6c
if you just wanted a number, could use something like:
Math.floor(Math.random() * 1000000)
You could set a property to be the counter and increment from there. There would technically be a race condition where two threads could read the same value and come up with the same result but it would be very difficult to produce that issue.
or use a GlideRecord lookup for existing non-employee profiles to get the max value and increment that
Post a Comment