Security Filters of NAV not working in Web Services

swapnil1985swapnil1985 Member Posts: 12
edited 2010-04-06 in NAV Three Tier
Hello All,

I am trying to set Security filters for Table Data of Job (table 167) as follows
In Permission Table:


Then i am trying to access the Job table data through below code through web services:
ddljob.DataSource = JobList_serv.ReadMultiple(null, null, 0);
ddljob.DataTextField = "Description";
ddljob.DataValueField = "No";
ddljob.DataBind();


But getting the error "You do not have permission to read Job Table".

This security filter is working correctly for Classic Client and RTC. for this windows user job table is showing data of only No. = 'A003_A'. But on Web through web service it is showing the above error.

Please Help me out..

Thanks in Advance

Swapnil Mehta

Comments

  • Gabor_PestiGabor_Pesti Member, Microsoft Employee Posts: 7
    Hi,

    Thanks for finding this issue. Unfortunately it seems to be a bug in the product. I managed to reproduce it both in the RTM and in the SP1 version. I logged now this in our internal bug tracking system, however I suggest to report it through the official channels as well to increase the chance we can create a hotfix for this.

    It seems that the Read method on the service still works with Security Filter, so if you know the key of the records in the table you are interested in, then you can access the data you need. However I have no idea how to get the list of keys.
    Regards,

    Gabor Pesti

    “This posting is provided "AS IS" with no warranties, and confers no rights.”

    Software Developer Engineer in Test
    MSFT
    Dynamics NAV
  • swapnil1985swapnil1985 Member Posts: 12
    If you want to make work security filters in NAV Pages then in OnOpenPage trigger of every page where you want to have effect of security filters write code: Record.SetPermissionOnFilters

    Thanks & Regards,
    Swapnil
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hi,

    Thanks for finding this issue. Unfortunately it seems to be a bug in the product. I managed to reproduce it both in the RTM and in the SP1 version. I logged now this in our internal bug tracking system, however I suggest to report it through the official channels as well to increase the chance we can create a hotfix for this.

    It seems that the Read method on the service still works with Security Filter, so if you know the key of the records in the table you are interested in, then you can access the data you need. However I have no idea how to get the list of keys.
    I thing it's not a bug.
    In forms also, same thing is there.
    and it can be solved as Swapnil suggested above.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
Sign In or Register to comment.