Microsoft Dynamics AX 2012 Security Policies Extensible Data Security (XDS)- Create a Policy Query

In previous article we have learned high level detail of Security policies for Extensible Data Security

In this Article we will discuss in detail how to create a security policy that limiting users from viewing other users prospects.

In some sales environments, sales people closely guard their prospect information, and they do not want other sales people to view their prospects data.

  • A prospect is stored in the smmBusRelTable.
  • The person who is responsible for the prospect is stored in the MainContactWorker field.
  • An employee is connected to the current user through the DirPerson and DirPersonUsertables.

There are two stages in creating the XDS policy:

    • Policy query
    • Security policy.

In this article we will cover Policy Query:

The follows are the steps to create the policy query:

    1. In the AOT open two AOT Nodes

1

2. Create a new query in AOT, rename it to HcmSalesUser.

2

3. From a second AOT, locate the table Data Dictionary > Tables >HcmWorker.

3

4. Drag the table HcmWorker to the Data Souces node of the query HcmSalesUser.

4

5. In the property sheet of the Fields node of the HcmWorker_1 data source, set the Dynamic property to Yes.

5

6. From the second AOT, locate the table Data Dictionary > Tables >DirPerson.

6

7. Drag the table DirPerson to the Data Sources node of the HcmWorker_1 data source.

7

8. In the property sheet for the DirPerson_1 data source, set the Relations property to Yes.

8

9. In the property sheet for the Fields node of the DirPerson_1 data source, set the Dynamic property to Yes.

9

10. From the second AOT, drag the table DirPersonUser to the Data Sources node of the DirPerson_1 data source.

10

11. In the property sheet for the DirPersonUser_1 data source, set the Relations property to Yes.

11
12. In the property sheet for the Fields node of the DirPersonUser_1 data source, set the Dynamic property to Yes.

12

13. Right-click the Ranges node of the DirPersonUser_1 data source, and select New Range.

14. In the property sheet for the new range, set the Field property to User, and the Value property to (currentUserId()).

13-Ranges

15. Save your changes to the query.

Further we will cover Security Policy in detail Cheers!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s