In a previous article we 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 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

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

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

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

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

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

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

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

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

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

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

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

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()).

15. Save your changes to the query.

Further we will cover Security Policy in detail!