Options

Maintain an additional avaiable Qty

kenlkenl Member Posts: 182
Hello,

I need to maintain an additional available Qty balance for sales order line. Whenever there is change on sales line Quantity, I need to update the additional available Qty.

My strategy would be adding coding at Table\Sales Line\

OnInsert -> Reduce my available Qty by Rec.Quantity
OnModify -> Increase my available Qty by xRec.Quantity, and Reduce my avaialbe Qty by Rec.Quantity
OnDelete -> Increase my avaialbe Qty by Rec.Quantity

However, since these three triggers are not always be run. Especially for "OnDelete". So, Does anyone has a good suggestion for maintaining an additional Qty ? Where should I add code ?

Best Regards,
Ken

Comments

  • Options
    pri_1_ranjanpri_1_ranjan Member Posts: 67
    create an additional field and write codes on "OnInsert" of the table where in it will decrease the actual quantity. then write codes on "OnValidate" of Quantity when u either try to modify or delete the value in the field


    Hope that it will help
    /PDR
Sign In or Register to comment.