web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Error deleting Item after we updated PU 27 to PU30

(0) ShareShare
ReportReport
Posted on by 660

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.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    Hi JFM,

    Do they delete the product from within Dynamics 365 or using your custom entity?

  • JFM Profile Picture
    660 on at

    Direct from the Released product page (...&mi=EcoResProductDetailsExtendedGrid)

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    I dont see such a trigger exist on WHSInventTable in my environment which have preview of PU31. Is this something custom present in your environment only ?

  • JFM Profile Picture
    660 on at

    I don't know.

    For sure we dont have any customization that create trigger in the database.

    Probably a parameter somewhere that create this.

    I deleted this trigger on my VM and synchronize to see if the trigger is back and no, this trigger is not there anymore.

    So it must be something else that creates the trigger.

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    Well you mentioned about entity BOAEcoResReleasedProductsEntity  which is not definitely standard entity and commenting of 11 triggers from some other tables , so definitely somebody mist have perform some action which created these triggers on tables.   what are the other tables names  where you commented those triggers ?

  • JFM Profile Picture
    660 on at

    By meaning no customization, i mean create code that create trigger on the table.

    I know those triggers are probably related to this entity since we found its name in the trigger's name (this entity is there for a couple of months, one year? and a couple of versions before PU27).

    EcoResStorageDimensionGroupItem

    EcoResTrackingDimensionGroupItem

    InventItemGroupItem

    InventModelGroupItem

    InventTableModule (3 triggers with the same code)

    WhsInventTable

    WhsReservationHierarchyItem

    + 4-5 other tables

    Those are all tables that are been used in the datasource of the entity.

    I need to understand why the problem is now happening with deletion of released product with PU30.

    What is the purpose of this trigger and why it seems to be link to my problem.

    How this trigger was created by the system and how to avoid that.

    Yes i can delete this entity and there is chance that the triggers will all be delete but I have to recreate the entity after (we have a couple of entities). And maybe this is not the only entity that have this problem right now.

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    Can you check id there is any method on this entity which is creating this trigger ?

  • JFM Profile Picture
    660 on at

    Only the method postLoad() to fill some fields that need calculation.

  • JFM Profile Picture
    660 on at

    i made a sql query to list all the triggers name in our d365 database.

    86 triggers, some are normal since they are created by the log activate on the table.

    If I check only the trigger with "entityExport" in the name, i have 49.

    And some are not with a name build from a custom entity like :

    AIFCustCustomerEntityExportCustCustomerEntityCustCollectionsContactAc9b91a74d27740c787ff5c7062456da0 (in table CustCollectionsContact)

    AIFCustCustomerEntityExportCustCustomerEntityTaxInformationCustTable1ddb103995334528875729003e680882 (in table TaxInformationCustTable_IN)

    AIFCustCustomerEntityExportCustCustomerEntityWHSCustTableAfterDelete248a5af227b24f67a040fb55d2fab815 (in table WHSCustTable)


    Ok all the list i got are the same as what i just found in the table AifSqlCtTriggers that i just discovered. Will take a look at the table and references.

  • JFM Profile Picture
    660 on at

    Wow, i just check the AifChangeTrackingConfiguration class

    there is a method call createTrigger, but the method is now obsolete.

    and the description said :

    The main use of this API is to touch a parent table when a child table

       /// is deleted. This is required for  Change Tracking.This method creates a boiler plate for the

       /// trigger and inserts the user-defined SQL statement in the trigger body. This is not meant as a

       /// general purpose trigger creation mechanism. It will only enable triggers to be created for tables

       /// that are enabled for change tracking

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans