Thursday, 20 February 2014

How to perform a successful round in AX from real to integer?

static void Job(Args _args)
{
    int amount1, amount2;
    real amount1 = 785.78, amount2 = 450.35;
    ;
    amount1 = decround(amount1, 0);
    amount2 = decround(amount2, 0);
    // It shows 786, 450
    info(strfmt("%1, %2", amount1, amount2));
}

No comments:

Post a Comment