AX 2012 - roundDownDec method syntax and example

Hi Folks,

Please find below code for roundDownDec method in AX 2012.

Global::roundDownDec Method [AX 2012]

Syntax

client server public static real roundDownDec(real value, int numDec)

Run On
Called

Parameters
value
Type: real

numDec
Type: int

Example:

// Code written by Chirag Gupta
// Summary: This code will round the value till two decimals;
// You can change the roundDownDec(_args1, _args2) second argument according to your need.
server static void roundDownDecExample(Args _args)
{
    real r = 37563.5343100000000000;
    real a;

    a = roundDownDec(r, 2);
    r = a;

    info(strFmt("%1", r));
}

// Output for the above code will be 37563.53

Author:
Chirag Gupta
Microsoft Dynamics 365 AX Technical Consultant at IBM Bangalore

Date:
17-Sep-2019

Happy Learning !!

Comments

  1. Ax 2012 - Rounddowndec Method Syntax And Example >>>>> Download Now

    >>>>> Download Full

    Ax 2012 - Rounddowndec Method Syntax And Example >>>>> Download LINK

    >>>>> Download Now

    Ax 2012 - Rounddowndec Method Syntax And Example >>>>> Download Full

    >>>>> Download LINK jg

    ReplyDelete

Post a Comment

Popular posts from this blog

[Solved] : Error: String or binary data would be truncated. Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp)

AX 2012 - Command prompt compilation / AxBuild.exe for Parallel Compile on AOS of X++ to P-code / Parallel Compilation

AX 2012 - How to send SSRS report in email as an attachment using X++

AX 2012 - How to stop AOS when services got stuck at stopping status

AX 2012 - How to make a form field mandatory

Error: There was no endpoint listening at net.tcp://your_server_name:8201/Dynamics AX/Services…

Fetch vendor address using X++ in AX 2012

AX 2012 - How to print current date and time on SSRS Report

[Error] - Error in unit of amount in currency KES. Must be rounded to 0.01 | The unit of 37.563.5343100000000000 KES being posted to account 32710001-- is outside the current penny rounding threshold | Posting has been canceled

[Solved] : AX 2012 - No connection could be made because the target machine actively refused it 192.168.10.249:8201