But 2 digit wont be random always once it holds a 99 value then what you are going to do??
The above code is to generate two separate random numbers between 1 and 1000 - it is not to generate two random digits.
The generated numbers should be (pseudo-)random but they won't necessarily be unique - this wasn't a requirement in the initial post so the sample code didn't try to achieve this.
Answers
you can use functions RANDOM and RANDOMIZE. Please see Dynamics NAV for more information
But 2 digit wont be random always once it holds a 99 value then what you are going to do??
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
The above code is to generate two separate random numbers between 1 and 1000 - it is not to generate two random digits.
The generated numbers should be (pseudo-)random but they won't necessarily be unique - this wasn't a requirement in the initial post so the sample code didn't try to achieve this.