After an update to PU30, users told us they can't delete Released Products now.
We tested in our UAT environment and we got also this error.
The error we got is from SQL, not from a object in D365.
here is a copy from the Event viewer :
The description for Event ID 117 from source Dynamics Server Azure cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Object Server Azure:
[Microsoft[ODBC Driver 17 for SQL ServerUnspecified error occurred on SQL Server. Connection may
have been terminated by the server.
DELETE FROM WHSINVENTTABLE WHERE (((PARTITION=5637144576) AND (DATAAREAID=N'boa')) AND (ITEMID=?))
We have not any extension or eventHandler on delete method for whsinventtable, or whsinventenabled or inventtable
Since a find nothing special in AOT and the error came from SQL Server, i take a look at the WhsInventTable and found a trigger for this table.
ALTER TRIGGER [dbo].[AIFBOAEcoResReleasedProductsEntityExportBOAEcoResReleasedProductsEnta4603dac57fb4daeb49f394dabb6abfd]
ON [dbo].[WHSINVENTTABLE]
AFTER DELETE
AS
BEGIN
SET NOCOUNT ON;
update INVENTTABLE set INVENTTABLE.RECID = INVENTTABLE.RECID
from INVENTTABLE
cross join DELETED
where
DELETED.ITEMID = INVENTTABLE.ITEMID
END
I don't understand what the purpose of this trigger. It does nothing (set RecId = RecId ??)
For test, i put the update in comment and try again to delete my released product.
Same kind of error, but not the same table. Oh. I comment the next trigger, etc. I comment exactly 11 triggers and now i can delete my released product in UAT.
So my question is Where does that triggers come from ? Why this produce an error ?
My next step on my VM est trying to delete one of this trigger, and synchronize the database and see if VS recreate this trigger.
After, I will try to delete my entity BOAEcoResReleasedProductsEntity (the name that we can see in the long trigger name), full build and synchronize and see if all these triggers disappear.
Thanks in advance for your help.