locked
Is there any way to query a FilteredView from within a Plug-in? RRS feed

  • Question

  • I can't seem to make this work.  I'm using Execute as user='<domain>\<user>' in my query and have configured GRANT IMPERSONATE ON LOGIN :: [<domain>\<user>] TO [NT AUTHORITY\NETWORK SERVICE].  My query times out in the Plug-in.

    Can anyone help with this?

    Thanks,

    xrm2011

     

    Friday, March 4, 2011 8:28 PM

Answers

  • Add your NETWORK SERVICE account and your domain\user account to the privreportinggroup and make sure the domain\user has access to the data in CRM permissions.
    Jamie Miley
    • Marked as answer by xRM2011 Friday, June 3, 2011 9:47 PM
    Friday, March 4, 2011 8:50 PM
    Moderator
  • Hi

    Have you identified why the plugin is timing out? Is the SQL query a culprit? I don't see permission issues to be causing a time out. It may be that your query is long running. Can you try running the same query in SQL Management Studio and see if it takes a long time? Also, you can try enabling traces and SQL profiling to identify what is causing the time out.

    Thanks


    Abhishek Agarwal MSFT
    Saturday, March 5, 2011 6:20 PM

All replies

  • Add your NETWORK SERVICE account and your domain\user account to the privreportinggroup and make sure the domain\user has access to the data in CRM permissions.
    Jamie Miley
    • Marked as answer by xRM2011 Friday, June 3, 2011 9:47 PM
    Friday, March 4, 2011 8:50 PM
    Moderator
  • Hi

    Have you identified why the plugin is timing out? Is the SQL query a culprit? I don't see permission issues to be causing a time out. It may be that your query is long running. Can you try running the same query in SQL Management Studio and see if it takes a long time? Also, you can try enabling traces and SQL profiling to identify what is causing the time out.

    Thanks


    Abhishek Agarwal MSFT
    Saturday, March 5, 2011 6:20 PM