Creating policies
The term "Security policies" is a slight misnomer. It is also known under a more accurate term of Extensible Data Security (XDS). It is an evolution of record level security that was deprecated from AX 2012: you could still do this, but it wasn't a recommended approach.
In this scenario, we will create a policy that only allows access to vehicles of type truck. In this scenario, we have a team that only has access to trucks when creating service orders.
How to do it...
To create a role, follow these steps:
- Choose to add a new item to the project.
- In the
Add New Item
dialog, selectData Model
from the left-hand list andQuery
from the right. - Enter
ConWHSVehicleTruckPolicy
in theName
field and click onAdd
. - In our new query, drag the
ConWHSVehicleTable
table to theData Sources
node. - Add the
VehicleType
field to theFields
list by right-clicking on theFields
node and choosingNew
|Field
. - Drag the field onto the
Ranges
node. - On the new
VehicleType
range, change theValue
property...