Can I use table IM_ItemWarehouse to trigger script?

SUGGESTED

Hello I was just wondering If  I can trigger a user defined script, with table IM Item Warehouse? I'm looking to trigger a script when there are changes on an item inventory. I see a field named Available on Item Maintenance > Quantity, I'm assuming this field isn't on the table ? or maybe I should use other method to obtain inventory?

  • 0
    SUGGESTED

    Available is a calculated based on settings in Inventory Setup Options.

  • 0 in reply to BigLouie
    SUGGESTED

    When working with a new business object, I often test the triggers to see when they fire.  I'm not sure how IM_ItemWarehouse works with scripting.  I expect changing QoH would fire a PreWrite script, but something like OnSO / OnPO might not.

    As BigLouie indicates, Available is a calculation based on different IM_IW columns (depending on setup options).

  • 0

    What is your ultimate goal?

    Is it to alert a user when inventory reaches a certain level?

    If yes, perhaps you should consider looking into Sage Alerts & Workflow.

    As for the events, even in 2020, i don't believe any processes that update the quantity fields will trigger the table level or column level events.

    You can always use a simple script that writes to the activity log, trace log, your own text log file, or display a message box and attach it to all of the table level events and a few of the target column events and then perform some activities that should affect the table and columns. For example, i would expect any changes made from the Item Maintenance > Reorder screen to trigger the table level events and a few of the column level events but i would not expect a change to one of the quantity fields such as QuantityOnSalesOrder to trigger any events, likewise, a change to the QuantityOnHand caused by a journal/register being updated likely won't trigger any events either.