using Microsoft.Dynamics.AX.Security.Management.Domain; class SecurityApiDemo { public static void main(Args _args) { var privilegesRepo = SysSecurity::GetSecurityRepository().Privileges; var privEnumerator = privilegesRepo.LoadAll().GetEnumerator(); while (privEnumerator.MoveNext()) { Privilege privilege = privEnumerator.Current; setPrefix(strFmt("Privilege %1", privilege.Name)); var grantEnumerator = privilege.ActionMenuItemGrants.GetEnumerator(); while (grantEnumerator.MoveNext()) { MenuItemGrant grant = grantEnumerator.Current; info(strFmt("%1 (%2)", grant.Name, grant.Grant.ToString())); } } } }
安全API / Security API
与本文相关的文章
- Powershell(D365FO)中的简单元数据查询 / Simple metadata query in Powershell (D365FO)
- D365FO中的查找显示方法 / Finding display methods in D365FO
- Visual Studio中的彩色选项卡 / Colored tabs in Visual Studio
- FormObservableLink在数据源扩展中起作用 / FormObservableLink works in data source extensions
- .NET类型的“is”和“as”运算符 / ‘is’ and ‘as’ operators with .NET types
- PU31中的异常处理 / Exception handling in PU31