Create new extensible data security xds ax 2012
Here is an example of how to create a new extensible data security (XDS) entity in Microsoft Dynamics AX 2012:
Step 1: Create a new table
In the AOT (Application Object Tree), right-click on the "Tables" node and select "New" > "Table". Name the table, for example, "MyXDS".
Step 2: Define the table structure
In the "MyXDS" table, define the fields that will store the data security information. For example:
MyXDSId
(unique identifier)Name
(name of the data security entity)Description
(description of the data security entity)DataSecurityType
(enum to specify the type of data security, e.g. "Read", "Write", "Delete")DataSecurityScope
(enum to specify the scope of the data security, e.g. "Company", "Department", "User")
Step 3: Create a new data security entity
In the AOT, right-click on the "DataSecurity" node and select "New" > "DataSecurityEntity". Name the entity, for example, "MyXDS".
Step 4: Configure the data security entity
In the "MyXDS" data security entity, configure the following properties:
Table
property: set to the "MyXDS" table created in Step 1DataSecurityType
property: set to the enum value defined in Step 2DataSecurityScope
property: set to the enum value defined in Step 2
Step 5: Create a new data security policy
In the AOT, right-click on the "DataSecurityPolicies" node and select "New" > "DataSecurityPolicy". Name the policy, for example, "MyXDSPolicy".
Step 6: Configure the data security policy
In the "MyXDSPolicy" data security policy, configure the following properties:
DataSecurityEntity
property: set to the "MyXDS" data security entity created in Step 3PolicyType
property: set to "Allow" or "Deny" depending on the desired behaviorPolicyScope
property: set to the enum value defined in Step 2
Step 7: Deploy the changes
Deploy the changes to the AOT by clicking on "Deploy" > "Deploy to Database".
Step 8: Configure the data security policy in the database
In the database, navigate to the "Data Security" > "Policies" node and create a new policy by clicking on "New" > "Policy". Name the policy, for example, "MyXDSPolicy".
Step 9: Configure the data security policy rules
In the "MyXDSPolicy" policy, create new rules by clicking on "New" > "Rule". Configure the rules to specify the conditions under which the data security policy will be applied.
Step 10: Test the data security policy
Test the data security policy by simulating different scenarios, such as:
- A user trying to access a record that is protected by the policy
- A user trying to modify a record that is protected by the policy
Verify that the policy is enforced correctly and that the user is either allowed or denied access to the record.
This is a basic example of how to create a new extensible data security entity in Microsoft Dynamics AX 2012. The actual implementation may vary depending on the specific requirements of your organization.