Hi Steve, Many thanks for your help. I think that placing the trigger code on InventUpd_Physical.updateNow() wont do the trick for all situations, reason being that it seems that when say new stock is registered the physical stock is updated however there is no call to the InventUpd_Physical.updateNow() method.
The solution I came up with was to modify the InventUpdateOnHand class to use the InventSumDelta records (which are effectively the updated values which are to be flushed to the InventSum) to check if any physical transaction involved a Location record and then update accordingly. This seems to work! Of course you have to make it a point not to lock the WMSLocation table unless necessary, as otherwise this could potentially slow the system down. thanks again for the tip. Regards, John. --- In [email protected], "Steeve Gilbert" <[EMAIL PROTECTED]> wrote: > > Hi John, > > I've done a similar customization and I put the trigger code in > InventUpt_Physical.updateNow(). If I remember correctly it is only > triggered when PhysivalInvent is changed, but maybe that can give you > a hint. > > Good luck! > > Steeve... > > --- In [email protected], "jpchircop" > <jpchircop@> wrote: > > > > Hi all, > > > > I have been digging into the DAX classes for a while now in search > of > > a solution to my problem, just wondered if anyone of you could > help... > > > > I want to update a new field on the warehouse locations table > > (WMSLocation) whenever a physical transaction against a location > > record is posted. > > > > What I need is that whenever (from any Journal) the OnHand stock on > a > > Location is updated (ordered, reserved, registered, picked...) the > > new field on the corresponding location record is updated > accordingly. > > > > My original design was as follows: Calls on the insert/update > methods > > on the InventSum table which update the location records. > > > > The problem lies in that DAX does not always call those methods > when > > updating inventory levels, direct SQL statements which bypass my > code > > are called! > > > > Any ideas on how to move on? I have been looking at the > > InventUpdate/InventMovement class trees, but I may be a bit lost > > now... > > > > Any help would be highly appreciated! > > > > John. > > >

