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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Possible problem with model store.

(0) ShareShare
ReportReport
Posted on by 4,077

I am having a problem with deleting elements in my usr layer.

As an example i have a class names PCImportAttributeDefaultValueHandler, it exists in syp and usr, though if i do a compare there are no differences.

Not if i try to delete the class, i get this error.

Error Message (14:35:01) Cannot execute a stored procedure.
The SQL database has issued an error.
Info Message (14:35:01) SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModelElementData_HasModelId_LayerId". The conflict occurred in database "Axapta60_0R3_model", table "dbo.Model".
Info Message (14:35:01) SQL statement: { CALL [Axapta60_0R3_model].[dbo].[XU_Insert](?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }

Any idea what is wrong?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    You can get in these situations from time to time. I haven't been able to identify how one gets here, and the fix can be different depending on the particular scenario. Sometime, the model db can get quite badly corrupted and it may need a restore from a previous error free backup. If you don't have one, or is too old, you can try to fix these manually.

    Of course, always backup your model db before starting to look in the model db.

    In your case, I would try for instance, to recreate a new change on the USR layer on that object, restart the AOS, and try to delete the object. If this doesn't work, there are other options we can try.

  • Rudi Hansen Profile Picture
    4,077 on at

    Well this is a test system, so did not make a backup.

    I will just reinstall it if we can't fix it easy.

    Now i tried to make a change to the class, but then i also get the same error.

  • André Arnaud de Calavon Profile Picture
    301,699 Super User 2025 Season 2 on at

    Hi Rudi,

    Can you try to move the object to a new USR layer model and then delete the model (and so also this object)?

  • Rudi Hansen Profile Picture
    4,077 on at

    That also gives me the same error, I have given up and am simply doing a reinstall.

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

News and Announcements

Season of Giving Solutions is Here!

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans