I created a trigger to capture changes to a field containing a SalesTerritory description.
If I update the table with the trigger using SQL Management Studio it succeeds without any problems.
We are using Great Plains as our ERP and the table in question with the trigger is for the Great Plains customer master. If we update the customer master via the Great Plains application it throws an error.
Unhandled database exception:
A save operation on table 'RM_Customer_MSTR' failed accessing SQL data.
I realize that no one may be familiarr with Great Plains but what may be causing this to ocurr?
One other issue that we've seen is that when we add a new customer record through Great Plains, no error is generated but the trigger does not create an entry into the udtAuditTerritory table.
I have attached the trigger to this message.
Any assistance is appreciated!
insert into dynamics_ext.dbo.udtAuditTerritory
, d.salsterr --'From'
, i.salsterr --'To'
from deleted d join inserted i
on d.custnmbr = i.custnmbr
and d.salsterr <> i.salsterr