Hi,
Today i faced an scenario, where i need to generate a OTP for specific number of digits. With help of some blog references i got to achieve it.
Below code helped me to achieve the requirement.
RandomGenerate randomGenerate;
randomGenerate = RandomGenerate::construct(); randomGenerate.parmSeed(new Random().nextInt());
switch(numberOfDigits) { case 5: RandomNo = randomGenerate.randomInt(10001,99999); //5 digits break; case 9: RandomNo = randomGenerate.randomInt(100000001,999999999); //9 digits break; }
Greetings,This blog will mainly focus on almost all versions of AX. It will contain the coding logic and solution which i face in day to day life. It may also contain post referenced with other blogs. This blog will be helpful for the freshers and some times experienced. My only motive is to help out the people and share my knowledge. Kindly encourage me on this journey.
Monday, May 20, 2019
Generate Random Integer
Subscribe to:
Post Comments (Atom)
How to execute SQL directly form Dynamics AX X++
How to execute Sql directly form Dynamics AX X++ Reference by : alirazazaidi Dynamics Ax provide many other ways to communicate with databas...
-
Hi All, Simple way to concatenate String in x++ is using plus(+) sign or strFmt function. List of concatenating methods in x++: strFmt str s...
-
Hi, Today i will be sharing the code to pass the range of a enum value while working in x++ query or adhoc query. SalesTable_ds.query...
-
ISSUE: When you deploy the report in Dynamics AX 2012 or D365F&O and you try to view the report and get the error "no report data t...
No comments:
Post a Comment