What will be the best solution to set up permission for users to input Sales Quote only and not Sales Orders? If anyone can help me out here, I will be really appreciate it! Thanks! No Vision
To my knowledge it cant be done without a small change to the system, because the data resides in the same table. Below is two solutions, that a developer could easily implement. For both solutions a new field in the user table is created, called Only Quotes as a boolean field, and it is shown on the user setup form. 1) The following code is placed on the OnOpenForm on the Sales Order form (UserSetup is a variable for the User setup record): UserSetup.GET(USERID); IF UserSetup.“Only Quotes” THEN ERROR(‘You are not allowed to enter quotes’); 2) Same code as above is placed on the salesheader table in the oninsert/onmodify trigger with the fowollowing line before the code IF “Document Type”=“Document Type”::Quote THEN BEGIN 1) Will block the user from even seeing quotes already in the system 2) Will allow the user to review quotes but not create/modify new ones.
Hello, I avoid using C/AL as much as possible when trying to set up permissions, as this can very quickly get messy. You can do this by denying the user in question the right to run the Sales Order form. This can be done by creating a copy of the ‘ALL’ user group/role (“ALL2”) and remove the “ALL” permisison from their rights, as “ALL” gives users the right to use all forms - delete the line that gives them the right to use all forms & replace it with entries for all forms that they need (This is time consuming, but effective) - Exclude the Sales Order form. The user with then be only able to open the Sales Quote & not the Sales Order form. You can prevent the user from converting quotes to orders by restricting their permissions to Codeunit 83 Sales-Quote to Order (Yes/No). Hope this is of help! -------------------------------- Edward Bloomfield Navision Support Consultant Cambridge Online Systems Limited www.cambridgeonline.net Edited by - EBloom on 2002 Apr 26 10:14:01
Edward you are right, i guess it is only if they can review the orders, C/al code should be used. FYI in my little code piece i have a mix up between what part is blocked/the error message, but i think people will get the idea.
Actually, we wants our Sales to be able to input Quotes themselves and also VIEW Sales Orders. Is there a way to set up permission without using C/AL?? No Vision
Hello again, You could create a new, non-editable version of the Sales Order form, and only allow the users access to this one to review orders… -------------------------------- Edward Bloomfield Navision Support Consultant Cambridge Online Systems Limited www.cambridgeonline.net
Got it! Thanks a lot. No Vision