Form ongetrecordafter Triger

Lokesh8262Lokesh8262 Member Posts: 3
edited 2015-09-24 in NAV Three Tier
I have Created BG Guarantee Form ,in that Order wise Utilized Amount value I am getting from sales header once that order posted .
i did calculation on BG Amount - Order wise Utilized Amount = Balance Value .

If I press released button the released field will become true, and I got the balance value amount , now I am going to post invoice ,and I am tagged BG No in that invoice card . now I got Order wise Utilized Amount in card only .in table I am still getting 0 for the Order wise Utilized Amount. It is not storing in table ,am getting values in card only .

I Wrote Code On Form Onaftergetrecord Triger

CLEAR("Order wise Utilized amount");
SalInvHead.SETRANGE("Sell-to Customer No.","Customer No.");
SalInvHead.SETRANGE("BG No.","BG No.");
"Order wise Utilized amount" += SalInvHead.Amount;
UNTIL SalInvHead.NEXT = 0;

"Balance Value" := "BG amount" - "Order wise Utilized amount";

if it is released it is calculating from sales header and we can view form only in table "Order wise Utilized amount" zero only .and aging i press reopen and released then it is effecting in table .
please suggest me help to fix the problem
Sign In or Register to comment.