I am trying to import item journal Line through XML Port in Navision 2013 R2.
i want to validate Amount in the item journal Line If the Value Is Zero else it should not validate
i did the following steps
Defined the Amount
Node Name Node Type Source Type Data Source
Amount Element Text <Amount>
Added following Code onAfterInsert
IF Amount <>'' THEN BEGIN
EVALUATE(decAmount,Amount);
IF decAmount = 0 THEN BEGIN
IF "Item Journal Line"."Entry Type" = "Item Journal Line"."Entry Type"::Sale THEN BEGIN
"Item Journal Line".VALIDATE(Amount,decAmount);
END ELSE BEGIN
"Item Journal Line".Amount := decAmount;
END;
END ELSE BEGIN
"Item Journal Line".Amount := decAmount;
END;
END;
But stil i am not getting my out put
0
Comments
Tino Ruijs
Microsoft Dynamics NAV specialist
Thank you so much for this. I have been figuring this out for days! This line helped and also instead of using the OnAfterInsertRecord trigger, I used the OnAfterModifyTrigger and it worked like a charm!