Defining permission sets in AL
An extension needs to contain at least a permission set. A permission set object in Dynamics 365 Business Central describes permissions on objects that you can then assign to your users for role-based access to the application.
You can define a permission set in AL by using the tpermissionset
snippet:
permissionset Id MyPermissionSet
{
Assignable = true;
IncludedPermissionSets = SomePermissionSet;
Permissions =
ObjectType ObjectName = ObjectPermissions;
}
Here is the permission set that we have defined in our previously created extension:
permissionset 50100 "PKT Packt Permission"
{
Caption = 'PACKT Permissions';
Assignable = true;
Permissions = tabledata "PKT Customer Category" = RIMD,
tabledata "PKT Gift Campaign" = RIMD,
tabledata "PKT Packt Setup" = RIMD,
tabledata "PKT Vendor Quality" = RIMD,
table "PKT...