Announcements
Dear Experts,
In blanket order I have created a field named as "Blanket order balanced quantity"
When we create a sell order from the Blanket sales order then how much balance quantity is left in the blanket order gets updated to the Blanket sales order balanced quantity.
But when we go to sales order and delete the line of that sales order then this field is not getting updated automatically in blanket order.
I have write the code on sales line table on (OnDelete() Button)
OnDelete()
IF (Type=Type::Item) AND ("Document Type"="Document Type"::Order) THEN BEGIN
IF "Line No."=0 THEN BEGIN
SalesLine2."Blanket Sales Order Bal. Qty.":=SalesLine2.Quantity;
SalesLine2.MODIFY;
END;
END;
Hi, I agree with Nitin, using FlowField is the easiest solution. Because you don't need to think about when to update this field.
https://docs.microsoft.com/en-us/dynamics-nav/flowfields
Hope this helps.
Thanks.
ZHU
You are not sharing your complete code. But as far as i can see you will also execute this code for all sales orders and not only the blanket orders?
Hello,
Why Line No. = 0???
Remove this statement and also check,
I hope SalesLine2 has a record which you want to modify.
sir,
Blanket sales order and sales order table is the same then how can we create flow field in it.
When a sales order is created with help of Blanket Order, it is auto updated in blanket order.
Hi,
Can you try to create a flow field?
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156