Add a check digit on generating number sequence through code x++ in d365F&O

 Hi Viewers,


We a check digit on generating  number sequence through code x++.

Check digit is a digit added as last digit to avoid wrongly entered by user. This didgit is summation of all the digits in the generated number.

X++ code as follows.

 public static str addCheckDigit(str _numberSeqNum)
 {
     return strFmt("%1%2", _numberSeqNum, modulo10(_numberSeqNum));
 }

 



Comments

Popular posts from this blog

Multi select lookup in UI Builder class in D365F&O through x++ code.

In ax D365F&O post packing slip from shipment through code x++.

Custom label layouts and printing In D365 F&O