Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

Non-surrogate key primary index is not valid for a company-specific table

$
0
0

Using AX 2012, and trying to create a parameters table as per msdn article:

http://msdn.microsoft.com/en-us/library/aa608474.aspx

I get the error "Non-surrogate key primary index is not valid for a company-specific table" (BP:842) with best practices check.  Using BOMParameters as an example I could not see why this table passes the check but mine does not.

I have done some investigation and notice in the SysBPCheckTable class there is:

if(sysDictTable.dataPrCompany() && sysDictTable.enforceRelationRules() && (sysDictTable.primaryIndex() != indexNum(Common,RecId)) )

        sysBPCheck.addError(#BPErrorNonSurrogateKeyForPerCompanyTable, 0, 0, "@SYS315491");

 

When I export the BOMParameters table I can see that enforceRelationRules is set to 0.  

What is the correct way to implement this, I believe I need to have a non-surrogate primary key but need to avoid best check errors.  Is there a tidy way of doing this or do I have to fudge it by amending the checks or setting a value that is not possible in the development environment?


Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>