Discussions
Activity
Best Of...
Sign In
·
Register
Home
›
NAV/Navision Classic Client
Howdy, Stranger!
It looks like you're new here. Sign in or register to get started.
Sign In
Register
Quick Links
Categories
Recent Discussions
Activity
Best Of...
Unanswered
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
115
Navision DOS
854
Navision e-Commerce
1K
NAV Tips & Tricks
772
NAV Dutch speaking only
615
NAV Courses, Exams & Certification
2K
Microsoft Dynamics-Other
1.5K
Dynamics AX
305
Dynamics CRM
109
Dynamics GP
10
Dynamics SL
1.5K
Other
993
SQL General
384
SQL Performance
34
SQL Tips & Tricks
34
Design Patterns (General & Best Practices)
Architectural Patterns
10
Design Patterns
5
Implementation Patterns
53
3rd Party Products, Services & Events
1.7K
General
1.1K
General Chat
1.6K
Website
79
Testing
1.2K
Download section
23
How Tos section
260
Feedback
12
NAV TechDays 2013 Sessions
13
NAV TechDays 2012 Sessions
Allow user to ship only
lamis
Member
Posts:
46
2017-04-13
in
NAV/Navision Classic Client
Dears,
how can I prevent a user from (ship and invoice) and (invoice) while posting a sales invoice? I just want to let this user (ship) only.
Regards,
0
Answers
RockWithNAV
Member
Posts:
1,139
2017-04-17
edited 2017-04-17
go to codeunit 81, there you will find this code
Selection := STRMENU(Text000,3);
IF Selection = 0 THEN
EXIT;
//ADD THIS CODE
IF Selection = 3 OR Selection = 2 THEN
ERROR(Not Allowed)
//ADD THIS CODE
Ship := Selection IN [1,3];
Invoice := Selection IN [2,3];
Thanks
Blog -
rockwithnav.wordpress.com/
Twitter -
https://twitter.com/RockwithNav
Facebook -
https://facebook.com/rockwithnav/
0
maheshroyal34
Member
Posts:
19
2017-04-18
edited 2017-04-18
Hi,
Can adjust the code in CU 81 like below,
Declare Text Constant variable Text003 = &Ship
//Selection := STRMENU(Text000,3);
Selection := STRMENU(Text003,1);
IF Selection = 0 THEN
EXIT;
Ship := Selection IN [1,1];
//Invoice := Selection IN [2,3];
Then user can have access and visible to "Ship" option only.
0
lamis
Member
Posts:
46
2017-04-18
This will be applied to all users, I just want to restrict one user only. Is that possible?
0
maheshroyal34
Member
Posts:
19
2017-04-18
edited 2017-04-18
Yes, it is possible to restrict particular user, but need to do some customization in code and table level
we can achieve like below(there may be more other scenarios to customize)
1. Add a field in table 91 "Onlyship" as boolean and Add the user in user setup, Mark "Onlyship".
2. Now adjust the code in Code unit - 81
Declared Table - 91 (user setup) as global variable with name "gRecUserSetup"
Declared Text Constant Text003 = &Ship
customize the code like below in CU-81
then we can prevent the user to access the other options.
0
Sign In
or
Register
to comment.
Answers
Selection := STRMENU(Text000,3);
IF Selection = 0 THEN
EXIT;
//ADD THIS CODE
IF Selection = 3 OR Selection = 2 THEN
ERROR(Not Allowed)
//ADD THIS CODE
Ship := Selection IN [1,3];
Invoice := Selection IN [2,3];
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
Can adjust the code in CU 81 like below,
Declare Text Constant variable Text003 = &Ship
//Selection := STRMENU(Text000,3);
Selection := STRMENU(Text003,1);
IF Selection = 0 THEN
EXIT;
Ship := Selection IN [1,1];
//Invoice := Selection IN [2,3];
Then user can have access and visible to "Ship" option only.
we can achieve like below(there may be more other scenarios to customize)
1. Add a field in table 91 "Onlyship" as boolean and Add the user in user setup, Mark "Onlyship".
2. Now adjust the code in Code unit - 81
Declared Table - 91 (user setup) as global variable with name "gRecUserSetup"
Declared Text Constant Text003 = &Ship
customize the code like below in CU-81
then we can prevent the user to access the other options.