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

Announcements

No record found.

News and Announcements icon
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,079

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,079 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
    303,395 Super User 2026 Season 1 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,079 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

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans