

In the above example, the CustTable would be the primary table. Primary table – is used to secure the content of the related constrained table.In the above example, the SalesOrder table would be the constrained table. Constrained table – is the table(s) given a security policy from which data is filtered or secured, based on the associated policy query.In the below terms I’m going to use the example of wanting to secure the SalesOrder table based on the customer group. Data Security Policy Conceptsīefore we jump into how the functionality works we need to have an overview of some of the concepts and terms. In simple terms, XDS is placing a WHERE (or ON) statement on any SQL SELECT, UPDATE, DELETE, or INSERT statement done to a table based on parameters from another related table. This feature was an evolution of the record-level security that existed in previous versions of Dynamics AX. Update the NextVal field to a value greater than the max RecId of the table.The Extensible Data Security (XDS) framework is a feature in D365FO and AX 2012 that allows users to supplement role based security and allow access to tables to be restricted by a policy. Open SQL Server Management Studio and get the max value for RecId for the table, from SystemSequences table. You can run a job to display the tableId in infolog.Ģ. You can find the tableId from AOT, under Properties for the table.ī. Steps to resolve the error 'record already exists':Ī. NextVal field should be set to a value greater than the max RecId of the table. To fix this error, we need to reset the NextVal field in SystemSequences table. There has been tableId conflicts during model store move Data is inserted in the SQL database directlyĢ. The RecId sequence for tables is stored in SystemSequences table and can get out of sync due to one/more of the following reasons:ġ. I verified all the unique index requirements were satisfied and there were no duplicated index values.Īfter investigating, I found out that the RecId generated by the system was getting a value that has been previously used.


One of the most common reasons for this error is, one of the unique index fields has duplicated value. I was recently working on an issue in Dynamics AX where, after a code move we started receiving the error: ‘Cannot create a record in "TableName." The record already exists.’ Dynamics GP to Dynamics 365 Business Central.Dynamics NAV to Dynamics 365 Business Central.
