B1 Validation not triggering when I add document but when updating
Good day,
I am trying to add a Boyum Validation where it triggers a block if the stock picked is locked. I am happy that it works correctly as I tested it by updating docs, but it does not trigger on new additions of SO. I assume its because the batches are not added to the table yet?
Any advise how I can sort this.

-
It will fail as you are triggering "Before" the document has been saved therefore the DocNum does not exist in ORDR yet.
Are you trying to block the document being added if the batches aren't selected?
Do you have a line loop running to check each row?
-
Hi Geoff,
I initially thought I can do it with sql and just adding the docnum's dynamic syntax. Thus, is there nothing I can do to allow the current sql to work? :(
I tried to do a line loop after I left the above comment on the batch number transactions but its giving me a pop up to say that its not a matrix. Even though it does seem to work with UF message coming up, and then the error message of not a matrix.
Batch serial number do not show the status so tried to do it on Batch transaction report (form 45) with the trigger being when the SO gets updated or added.
-
- I'm not sure if you want to block the entire order from being created if one of the items has selected a quantity with a status <> released or ??
- I think you will need to add your Boyum to the field "Selected Qty" on the available batches screen
- Add a validation that checks the batch status (simply query OBTN with the ItemCode & DistNumber)
- If result fails set qty to 0 and then either pop-up a MessageBox or cancel the order.
- Good luck
Please sign in to leave a comment.
Comments
3 comments