Options

Apply user permission on Sales header

kenlkenl Member Posts: 182
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

Comments

  • Options
    jonsan21jonsan21 Member Posts: 118
    Hi,

    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.
    Rgds,

    Jon.
  • Options
    saikiransaikiran Member Posts: 22
    Hi Jon,

    I also have come across the same problem. So what's the soluiton?
  • Options
    jonsan21jonsan21 Member Posts: 118
    Hi,

    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.
    Rgds,

    Jon.
  • Options
    kenlkenl Member Posts: 182
    Hello,

    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
  • Options
    vampireeyesvampireeyes Member Posts: 33
    consider this: why exactly would u want to restrict ur orders to a single entity?

    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... {
    ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿
  • Options
    kenlkenl Member Posts: 182
    Hello,

    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
    '',10001
    
    or
    <>'',10001
    
    or even

    However, both doesn't work.

    Any suggestion ? Thanks.
    Ken
  • Options
    vampireeyesvampireeyes Member Posts: 33
    Wouldn't it be handier to make users (the customers)

    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... {
    ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿
  • Options
    ShenpenShenpen Member Posts: 386
    I think security filters allow the "or" relationship: |

    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.
  • Options
    ShenpenShenpen Member Posts: 386
    Did it work?

    Do It Yourself is they key. Standard code might work - your code surely works.
  • Options
    kenlkenl Member Posts: 182
    Hello Shenpen,

    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.
Sign In or Register to comment.