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.
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:
-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:
Hi, I would like to know whether you have added any extra code for rupees and paisa to appear in the text. Thanks.
ReplyDeleteI have error: You hace specified an unknown variable. InitTextVariable. Define the vaiable under 'Global C/AL Symbols.
ReplyDelete