Setting Permission Filter

ayashi
ayashi Member Posts: 78
Hi Guys

I'm having trouble setting security permission for each user in database.
Step to duplicate :
1. Choose one user from database login dialog box
2. Choose Role 'ALL' and Custom Role (Copied From P&P-Q/O/I/R/C)
for that user (1)
3. Set Permission for role Custom Role, filter object data
'Table Data' ->item ledger table -> Filter Field Location -> BLUE
4. Login as user (1)

At this point I can't open item card, it said I don't have permission to read item ledger table. Isn't that I'm supposed to be able to view item card ? only if I drill down inventory field (sum index field from item ledger entry), the item ledger entry list already filtered based on permission security.

What did I do wrong ?

Is there any guide book to set up permission filter ?


Thanks

Comments

  • kriki
    kriki Member, Moderator Posts: 9,129
    I think it is because, the flowfield "Inventory" includes ALSO the other locations. So in the OnOpenForm-trigger, you should put a filter on the "Location Filter"-field.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • ayashi
    ayashi Member Posts: 78
    so I have to involve with coding when setting permission ?
    is there any way for user to set permission without having to write any single code, since the user doesn't have C/AL License
  • kriki
    kriki Member, Moderator Posts: 9,129
    In the OnOpenForm-trigger, you can put something like
    SETFILTER("Location Filter",'BLUE');
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • ayashi
    ayashi Member Posts: 78
    so user has to have C/AL license to do this ? phew ...

    is it possible to use dynamic filter ?
  • kriki
    kriki Member, Moderator Posts: 9,129
    No, you just have to program it once to set the filter you need. You can use some setup per user and then use that filter in stead of 'BLUE'
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!