I need to do checking on sales line data inputted by the user and this should happen when user changes row on sales order subform and if qty > 0
By using on trigger OnAfterGetRecord I can see row change when changing already inserted rows and OnNewRecord when changing to newline. Problem is that OnAfterGetRecord loops through all records when opening a form or changing from subform to main form.
Now I am thinking of inserting boolean field on sales line table, that indicates if checking is made or not on the line. Is there any other way to do this?
0
Comments
Thanks for your answer, requirements are these:
Sales person inserts line than can be Bills of materials and sometimes they want to explode BOM and sometimes not, but we don't want them to forget to do this selection. We could explode the BOM after quantity is filled but they might do adjustments on price. We have made modification that takes main item price to BOM items in propotion.
So we want to check is quantity changed or >0 if item is BOM when line changes and give dialog box to ask does user want to explode BOM.
OnAfterGetCurrRecord works better for this purpose and problem that I now have, is case where user clicks directly to form header, then I can use OnDeactivateForm but this gives same xRec.Quantity as Rec.Quantity from the line where clicked to form header.