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

Primary Key Must Be Mandatory

(0) ShareShare
ReportReport
Posted on by 485

We have an AX2012R3CU10 system that just started throwing a best practice error on one table that the primary key field "fieldName" must be mandatory.

- No updates applied to AX

- No changes made to this table in literally years

- The field is set to Mandatory = Yes

- Tried deleting and reimporting

- Tried synchronizing

- Tried a full AOT compile

- Tried deleting the indexes

Completely out of ideas.

Anyone else run into this?

Thanks,

- Brad

*This post is locked for comments

I have the same question (0)
  • Fredrik Sætre Profile Picture
    12,644 on at

    What table are we talking about? Also please check out this post that might solve the problem.

    ax2012exceldataimport.blogspot.in/.../dynamics-ax-2012-data-import-using_17.html

  • Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    I think best practice error might have occurred as the field may not be marked/recognized as not null on the backend.

    Please try the following steps(as you mentioned you tried deleting & reimporting)

    - Take backup of the table

    - Delete the table from backend(i.e from Sql Server Management Studio)

    - Synchronize the table from AX to create a new copy of table in the backend.

    - Import the data back

    Hope this helps you.

    Thanks,

    Chaitanya Golla

  • Brad Docimo Profile Picture
    485 on at

    Fredrik, thanks for responding.  This is a custom table.

  • Brad Docimo Profile Picture
    485 on at

    Chaitanya, I deleted the table, synchronized, verified it is completely gone from the SQL database, reimported the table.  It remains empty, but the errors return.

  • Fredrik Sætre Profile Picture
    12,644 on at

    Make sure your indexes are set correctly and check the article I referred to to check that all is set correctly on the table settings.

  • Brad Docimo Profile Picture
    485 on at

    I finally just gave up and deleted the table.  Recreated the exact same thing with a new name, and the errors are gone.  AX can be very frustrating..

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans