Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

Check sum(Qty) in DataSource and Compare with Form

$
0
0

Hi all,

 

I hv formA with dataSource tableA

tableA hs fields : itemID, Qty, Status

In formA I can add qty minus or plus.

But whenever I add the minus Qty, i need to check to sum(Qty) in tableA whether the Qty is below 0 or not .

 

I wrote this, but doesnt work

method: validateWrite

tableA a;

while select sum(Qty) from a group by a.ItemId where a.status::bad
    {
        if (Qty<0)
        {
            error("Message");
            ret=false;
        }
    }


Viewing all articles
Browse latest Browse all 9880

Latest Images

Trending Articles



Latest Images