Form Security in AX 2012

Today I will demonstrate you that How to secure forms in AX 2012.


You can create a form and a menu item by following these steps:
  1. Under AOT > Forms, create a form that is named NewForm.
  2. Under AOT > Menu Items, create a menu item named NewMenuItem for above form.
  3. Add the menu item you created to one of the existing Menus. For example, you can add it to AOT > Menus > Home > Common.
Create a Privilege and an Entry Point

You can create a privilege and an entry point for NewMenuItem by following these steps:
  1. Create a privilege that is named NewPrivilege.
  2. Expand AOT > Security > Privileges > NewPrivilege.
  3. Add an entry point that is named NewEntryPoint. You do this by right-clicking the Entry Points node, and then clicking New Entry Point.
  4. In the Properties window for the new entry point, do the following:
    1. Set the Name property to NewEntryPoint.
    2. Make the ObjectType of the entry point be MenuItemDisplay.
    3. Make the ObjectName of the entry point be NewMenuItem.
    4. Set the AccessLevel of the entry point to Read.

To properly test your form as an application user, you must create a test role. You can create a test role by following these steps:
  1. Create a test role for an application user that is named NewRole.
  2. Expand AOT > Security > Roles > NewRole > Privileges.
  3. Add NewPrivilege privilege to the Privileges node of NewRole.

At this point in this walkthrough you have created your form, the menu item for your form, and the test role. Now you are ready to test the access to your form for an application user.
You can test your form by following these steps:
  1. Manually assign user to the NewRole through System administration module -> Setup -> security ->Assign user to role form in client area.
  2. Log on the system as a user to whom you assign above role. 
  3. The Workspace window of an application user will contain the menu item NewMenuItem.
  4. You should be able to open NewForm by clicking on NewMenuItem.
  5. Log off the system as a current user.
  6. Remove NewRole from a user using the System administration module -> Setup -> security ->Assign user to role form in client area.
  7. Log on the system as a above user again.
  8. The Workspace window of an application user will no longer contain the menu item NewMenuItem.


Comments