You need to sign in to do that
Don't have an account?
SFDC_Evolve
Need Code to Generate 10 digit random number
Double N = math.random()*1000000000;
Long l = integer.valueof(N)*100;
string SNumber = string.valueof(l);
I have to insert that in a Text (External Id) fields.
Thanks
try this :
system.debug(crypto.getRandomLong()+'***');
All Answers
try this :
system.debug(crypto.getRandomLong()+'***');
Here is a more convoluted way that I came up with. It impresses the ladies. ;-)
By the way, with a little tweak, this is also an great way just to get a really long random GUID-like string. I use it to make security tokens.