web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Smartlist pointing to SQL view returning no data

(0) ShareShare
ReportReport
Posted on by 65

I'm getting some weird results with a smartlist pointed to a custom SQL View. The view exists on each company in our instance. I am a POWERUSER in all companies. The other day I noticed that I wasn't able to query the view or the table it's pulling from in SSMS, I raised the question to our DBA team and they said no table level security was present, and today I was able to run queries. Suspect, but whatever... I figured that would solve the issue. it did not.

I have the SQL Table Security set correctly in each company to allow the connection in the GP application. I granted access to both the view and the custom table it's pulling from to be sure. It works fine on one of our companies. the rest just return no data.  I can't find any difference in the company where the SL works, and those where it doesn't.

If I log in with the SA account, the smartlist works fine on every company. This smartlist was not created by me, but I went back through step by step and everything seems to be fine. Is there some security flag within GP that i am missing that is blocking access to the data? or is there something in the SQL view/table that is?

Categories:
I have the same question (0)
  • Hokuminaria Profile Picture
    2,950 on at

    Hey Mike,

    This is going to be a tough one to troubleshoot over a forum. I can speak in regards to Smartlist Designer but if you are using Smartlist Builder i wont be able to comment on that.

    I would approach this the following way:

    1. First, i would run your view as a SQL Script and verify it returns data. 
      1. If it does not, then their is an issue with your view that needs to be corrected first.
    2. If you received results from running the View as a script in SQL and you are returned data, go through the article below on how to create a Smartlist based off a view.

    How to create a Smartlist Designer report using a SQL View (microsoft.com)

    I hope this helps!

    Thank you!

    Brandon Jarrett | Microsoft Support Engineer.

  • Mike Bresnan Profile Picture
    65 on at

    Is that DYNGRP group what needs to be granted Select access for smartlists pointed at my view to work? I'm not a DBA by any means (and neither is anyone else at my company unfortunately) and our tech support team is less than knowledgeable. on the DB where i have select access, and the one that i don't, the view level granted access is blank. I'm assuming that means it must be granted at the DB level? unfortunately, my SSMS locks up when i try to see the securables for DYNGRP at that level, so i can't confirm...

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    You can run the GRANT.SQL script against your company database in SSMS. You will find this in C:\Program Files (x86)\Microsoft Dynamics\GP 2018\SQL\Util. This will grant the appropriate SQL access to everyone in the DYNGRP.

  • Suggested answer
    Joseph Markovich Profile Picture
    3,976 on at

    Mike-

    In SQL Server Management Studio, you can also grant the permissions with this:

    use <your company database>
    go

    grant select on <yourviewname> to DYNGRP
    go

    Joe

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans