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: 
- Under
     AOT > Forms, create a form that is named NewForm. 
 - Under
     AOT > Menu Items, create a menu item named NewMenuItem for above form. 
 - 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: 
- Create
     a privilege that is named NewPrivilege. 
 - Expand
     AOT > Security > Privileges > NewPrivilege. 
 - Add
     an entry point that is named NewEntryPoint. You do this by
     right-clicking the Entry Points node, and then clicking New Entry Point. 
 - In
     the Properties window for the new entry point, do the following: 
 - Set
      the Name property to NewEntryPoint. 
 - Make
      the ObjectType of the entry point be MenuItemDisplay. 
 - Make
      the ObjectName of the entry point be NewMenuItem. 
 - 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: 
- Create
     a test role for an application user that is named NewRole. 
 - Expand
     AOT > Security > Roles > NewRole > Privileges. 
 - 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: 
- Manually
     assign user to the NewRole through System
     administration module -> Setup -> security ->Assign user to role form in client area. 
 - Log
     on the system as a user to whom you assign above role. 
 - The
     Workspace window of an application user will contain the menu item NewMenuItem. 
 - You
     should be able to open NewForm by clicking on NewMenuItem. 
 - Log off the system as a current user.
 - Remove NewRole from a user using the System administration module -> Setup -> security ->Assign user to role form in client area.
 - Log
     on the system as a above user again. 
 - The
     Workspace window of an application user will no longer contain the menu
     item NewMenuItem. 
 
Comments
Post a Comment