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, ...
Suggested Answer

ErrorTablePrimaryKeyNotMandatory: The primary key must be mandatory in staging table

(0) ShareShare
ReportReport
Posted on by 1,552
Hi,

I created a table with an index that contains two fields (Filed1, Field2) where allow duplicate is No (Filed1 is mandatory and Field2 is not)
 
when i created the entity and staging table.. i got this BP warning on the staging table. I don't want to make Field2 as mandatory here because it's not mandatory in the standard table.

I can see that the primary index for the staging table is this index with allow duplicate no -- shall i change the primary index value on this staging table or shall i make Field2 mandatory?
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at
    In general, primary key field should be mandatory (unless they're enums). If the table doesn't follow this rule and you don't want to (or can't) change it, then suppressing the warning sounds to me like the right approach. Changing the primary key sounds wrong and you don't want the field to be mandatory.
  • junior AX Profile Picture
    1,552 on at
    Hi Martin,

    The primary index on the table itself is surrogateKey. But there is a unique index with duplicate No that contains two fields.

    The entity staging table automatically filled the primaryIndex property with allow duplicate no index.. so i think your suggestion is to leave this property as is in staging table

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 565 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