Hello,
I would like to set permission that only allow the user to create a sale order with a specific customer number.
I create a role, with the following permission:
ALL,
S&R-Register,
S&R-CUSTOMER,
S&R-Q/O/I/R/C,
S&R-Q/O/I/R/C, POST,
S&R-REGISTER,
And for Table data "Sales Header", I have set to allow insert/read/delete/modify, and the security filter as
Sales Header: Sell-to Customer No.=",C00730".
When I open sales order form, system has successfully filter the orders for customer C00730. However, when I create a new order, system prompt me for "Not permission to insert sales header".
Any idea to solve the problem ?
Ken
0
Comments
When you insert the Sales Header record in the first time, you will only insert the primary key (Document Type, and No.), and Sell-to Customer No. is not one of them.
So Sell-to Customer No. of the new inserted record will be blank, which you don't have permission into it since you define the security filter as mentioned earlier.
Rgds,
Jon.
Jon.
I also have come across the same problem. So what's the soluiton?
You can add some CAL code in the form level, such that for particular user, when they insert new sales header, the Sell-to Customer No. is always fixed to the security filter you've aplied earlier on.
A lil bit of hardcode, but should work your way thru.
Rgds,
Jon.
Jon.
I know the problem.
But is there any solution for that ? I think it is a very common task to set permission on sales order. Otherwise it would be meaningless to set the permission. :?
Any idea ?
Ken
than u would be better off with MS-Excel as all users would only have to account for one entity.
The coding bit seems like the solution. Make a table with UserID and Customer ID.
make a IF USERID = ... THEN only show Customer ID....
sound like a working solution . After a onetime adjustment u'll be able to keep on adding customers to ur users.
{ Intuitively wrong... {
¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿
My case would be a bit difference. The customer is practising some kind of "Customer self service" --- "Let their customers to create sales order". In this case, they will create user for each of their customers. When their customers logon Navision, they can only create their own sales order.
This is the reason I need to apply filtering on sales order by customer code.
So far I try to set a blank filter and a customer code on the security filter. Like
or or even
However, both doesn't work.
Any suggestion ? Thanks.
Ken
Modified Main screen ( only option = Create order)
Modified Order screen
Customer number = automatically filled in.
Only select article... select how many....
like ur basic online shopping center... which brings me to the next point... why don't they just make an online shop? Commerce Portal ?
{ Intuitively wrong... {
¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿
So try a filter like C00730|''
where double ' stands for empty string.
Maybe it helps.
Do It Yourself is they key. Standard code might work - your code surely works.
Do It Yourself is they key. Standard code might work - your code surely works.
Thanks for your "|" sign !
Now I am able to set filter on Sales Header and create the order successfully. For example, to filter a customer "C100", I would fill in ''|C1000 in the filter value.
It still far away from my security setup, since we need to set filter on Customer table And all document level (Sales Header, Sales Invioce, ...etc). But your suggest helps me a lot !
One thing I am wonder about setting security filter in Navision, after we set security filter on Table Customer -> "No.", how come we still need to set filter on Sales Header -> "Sell to Customer No."?
I think it is very logical to propagate the security filter from master table to other tables, since there is a table relation on the field.