Defining permission sets in AL
An extension need to contain at least a permission set. A permission set object in Dynamics 365 Business Central describes permissions on objectsYou 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 Customer Category" = X,
table "PKT Gift Campaign" = X,
table "...