Hello,
I recently made a similar post to this one regarding the insert version of this trigger, tI_tsoSOLineDist. Our issue was resolved and we are now able to save the original ShipDate entered so when the date changes, we can see by how much.
However, that solution saves the shipdate when the order is first entered and unacknowledged. We would instead like to save the date only after the order is acknowledged and open. Any subsequent changes in the date from this point would then be visible.
I wonder if we should use this update trigger instead? I've seen this code: IF NOT UPDATE(UpdateDate), would something like this work to set the condition of when the order moves from unacknowledged to open?
The code used to insert the record from the insert trigger is:
insert into tsosalesorderorigshipdate_exi (solinedistkey, origshipdate) select solinedistkey, shipdate from inserted, tsosoline with (nolock), tsosalesorder with (nolock) where inserted.solinekey = tsosoline.solinekey and tsosoline.sokey = tsosalesorder.sokey and tsosalesorder.trantype = 801