Navision 2015permissions

marios
Member Posts: 14
I would like to create a Nav group with full access expect permissions delete company , any suggestions ?
0
Best Answer
-
Hey Marios,
Method 1.
1. Navigate to Page 357.
2. Open in Design Mode.
3. Open Page Properties.
4. Make DeleteAllowed - NO.
This will remove the Delete Action from the Company page and no one can delete the company.
If you want to make it User Wise then follow this this Process
Method 2.
1.Open Table 2000000006
2.Write code on OnDelete Trigger.
3. UserSetup.GET(USERID);
IF NOT (UserSetup."Company Deletion Allowed") THEN
ERROR('User dont have the Permission to delete the Company');
Make a New Field in User Setup Table as "Company Deletion Allowed" . This way it will become Dynamic and you can handle this from the User Setup.
4. If you want to make it completely hard coded as only 1 user can delete like the administrator only then write this code
UserSetup.GET(USERID) ;
IF NOT (USerSetup."USER ID" = 'ADMINISTRATOR') THEN
ERROR('User dont have the Permission to delete the Company');
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5
Answers
-
Hey Marios,
What do you mean by Nav Group. If you will assign SUPER role to each user then its a master permission that you will give them and they can do anything with complete right.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Thanks for coming back , basically a bespoke SuperUser group without delete company rights . Do you know how to create that role ?
0 -
Hey Marios,
If you want to restrict users accessing multiple companies then you can look into this thread once
forum.mibuso.com/discussion/46305/restricting-a-super-user-to-access-only-one-company
If you just want to avoid deletion of the companies then you cant do the way you are expecting instead you have to make a new Roles the same as of super and you need to remove that system role and then assign specifically to each Individual user.
P.S - How users will delete the company - If from the Companies page then why not simply you remove the Delete Allowed permission from that particular page.
Many thanksThanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
@RockWithNAV can you instruct me on how to remove the delete allowed permission from page ? as well as make it available for administrator only0
-
Hey Marios,
Method 1.
1. Navigate to Page 357.
2. Open in Design Mode.
3. Open Page Properties.
4. Make DeleteAllowed - NO.
This will remove the Delete Action from the Company page and no one can delete the company.
If you want to make it User Wise then follow this this Process
Method 2.
1.Open Table 2000000006
2.Write code on OnDelete Trigger.
3. UserSetup.GET(USERID);
IF NOT (UserSetup."Company Deletion Allowed") THEN
ERROR('User dont have the Permission to delete the Company');
Make a New Field in User Setup Table as "Company Deletion Allowed" . This way it will become Dynamic and you can handle this from the User Setup.
4. If you want to make it completely hard coded as only 1 user can delete like the administrator only then write this code
UserSetup.GET(USERID) ;
IF NOT (USerSetup."USER ID" = 'ADMINISTRATOR') THEN
ERROR('User dont have the Permission to delete the Company');
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
@RockWithNAV Many thanks ! it worked i preferably go for the 1st method and work before jump to method 4 which sounds more professional approach0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions