How do I give a user the rights to turn a Sales Quote into a Sales Order by clicking the 'Make Order' button on the Sales Quote Form, but not allow that same user to insert a new Sales Order using the Sales Order Form? The user will still require modify and delete rights to a Sales Order.
Do I take away insert rights on the Sales Order Form and give a specific set of rights to a codeunit (or codeunits)?
Please advise.
Thank you.
0
Answers
The user has these rights:
Object Type: Codeunit
Object ID: 86
Object Name: Sales-Quote to Order
Read Permission: Yes
Insert Permission: Yes
Modify Permission: Yes
Delete Permission: Yes
Execute Permission: Yes
Security Filter: None
ObjectType: Table Data
Object ID: 36
Object Name: Sales Header
Read Permission: Yes
Insert Permission: Indirect
Modify Permission: Yes
Delete Permission: Yes
Execute Permission: Yes
Security Filter: None
ObjectType: Table Data
Object ID: 37
Object Name: Sales Line
Read Permission: Yes
Insert Permission: Yes
Modify Permission: Yes
Delete Permission: Yes
Execute Permission: Yes
Security Filter: None
This message is displayed when I try to manually create a Sales Order which is correct: You do not have permission to write in the Sales Header table.
I get the same error when clicking the 'Make Order' button on the Sales Quote Form. This is causing the issue for me.
What am I doing wrong?
Thanks again.
You won't be able to apply #2 since the Sales Quote uses the Sales Header and Sales Line table.
The other way is to modify the OnInsert trigger, but you will need a developer license to do this.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Thank you deadlizard, I was losing my mind on this one.
I have a developer license. How would I achieve this?
on sales line table on insert trigger add the following code.
if "Document type" = "Document type"::Order then
if Usersetup.get(USERID) and Usersetup."Block Sales order Insert" then
error('You are not allowed to insert sales order lines');[/code]
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
That makes sense.
I'll create a role with no permissions called "Block sales order insert" and if the user has that role I'll run the code.
Excellent and Thank You All !!