11 January 2011

Random Generation of number

static void RandomGenerateEg(Args _args)
{
RandomGenerate objRG = new RandomGenerate();
Random objRandom = new Random();
;
//This generates random numbers specified within the given range
//info(int2Str(objRG.randomInt(10,55)));

//This generates random numbers
info(int2Str(objRandom.nextInt()));
}

1 comment:

  1. Create in class Global method

    static int RandomGenerator(int _from, int _to)
    {
    return xGlobal::randomPositiveInt32() mod (_to - _from + 1) + _from;
    }

    then call it from any place like
    i = RandomGenerator(-99, 56);

    ReplyDelete

Give me the commetns and solutions

DB restore production DB to DEV environment in D365 FO using Bacpac file

  https://www.linkedin.com/pulse/restore-production-database-dev-environment-d365fo-using-abbas-tfwbe SQLPackage link : https://www.linkedin...