How to convert amount in words in Microsoft Dynamics Navision.

For converting the valid numeric value to words, follow below process.

-Create new codeUnit and define two variable as shown below.



Name
Datatype
Subtype
Length
Dimensions
AmountInText
Text

90
2
Rpt
Report
Check



Now write wire below code to “OnRun” trigger of code unit.

Syntax: object.FormatNoText(<AmountArrayVariable>,<Numeric value>,<Currency Code>)

Code::
Rpt.InitTextVariable;
Rpt.FormatNoText(AmountInText,2023,'');
MESSAGE(AmountInText[1]);

Output:



Comments

  1. Hi, I would like to know whether you have added any extra code for rupees and paisa to appear in the text. Thanks.

    ReplyDelete
  2. I have error: You hace specified an unknown variable. InitTextVariable. Define the vaiable under 'Global C/AL Symbols.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to make and use web service in Microsoft Dynamics Navision.

How to use Format function in Microsoft Dynamics Navision.

How to create simple report in Microsoft Dynamics Navision.