I'm having a hard time figuring the logic between Events and Validators in CSI/syteLine 9.01.01.
For instance, I'm trying to prevent users to save a PO line with an item that does not exist; I want to allow only items that are in Items or Non-inventory items.
At first I disabled the event "EditNonInvItem" that asks the user if they want to create a non-inventory item; this seems a little unrelated, but we want to prevent this too.
I did not find other relevant events in this Purchase Order Lines form.
Then I added a validator on the Item ComboBox (there was no validator), with type InCollection and parameters SLItemsNonInventoryItems( PROPERTY(Item) SETP(Item=Item) ), and mIsNotAValid error message.
So now I cannot save the PO line if the item does not exist in Items... but then all kinds of strange behavior happens:
- For non-inventory items, I'm being asked to create an Item/Warehouse record (which makes no sense)
- The other fields coming from Items or Non-inventory items, such as Description, U/M, etc., are not populated anymore...?!
I also tried to add a Method Call in ItemDataChanged event handler, but it seems to have changed nothing:
SLItemsNonInventoryItems.GetNonInvItemInfoSp( PARMS(VAR Item, RVAR Description, RVAR UM, RVAR MatlType, RVAR Revision, RVAR ProductCode, RVAR DrawingNum, RVAR FamilyCode, RVAR Buyer, RVAR CommCode, RVAR Origin, RVAR SubjectToNaftaRvc, RVAR UnitCost, RVAR PrefCrit, RVAR Producer, RVAR WeightUnit, RVAR UnitWeight, RVAR UnitPrice, RVAR AllowOnPickList, MESSAGE, VAR CurrCode, VAR OrderType, VAR OrderKey1) DISABLED() )
(the parameters auto-filled when I chose this IDO method)
This leaves me wondering:
- Why is the Items vs Non-inventory items dual behavior not working anymore?
- Why does adding a simple validator break the automatic population of other item-bound fields?
- Is there any documentation about how validators and event handlers behave?
Thanks,