This topic has not yet been rated - Rate this topic

Data Authorization

Data authorization in Microsoft Dynamics AX is performed in three ways:

  • Implicit authorization

  • Checks done by setting security properties on Application Object Tree (AOT) objects

  • Checks done in X++

Implicit authorization means that the kernel performs the check. An example of this would be when you are accessing a data source from a form or report. Record level security is used to determine whether the user has access to run the form or report.

An example of this is setting the security key and needed access level properties on menu items and on form or report controls.

Explicit authorization can be done in X++.

Examples:

if (hasSecurityKeyAccess(securitykeyNum(mySecurityKey), AccessType::View))
{
    myMethod();
}

if (hasMenuItemAccess(menuItemDisplayStr(myMenuItem), MenuItemType::Display)))
{
    myMethod();
}

DictTable dictTable = new DictTable(tablenum(myTable));
if (dictTable.rights >= AccessType::Insert))
{
    myMethod();
}

if (isConfigurationkeyEnabled(configurationkeyNum(myConfigurationKey))
{
    myMethod();
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ