Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Display query string from usage data

Posted on by 550

Hi, everyone,
I am currently trying to create a form using a key user, which should display a list of which user is using saved queries within a form.
The saved queries name should ideally be displayed and the queries should be output as a string.

I can also access the packed queries per user via the usage data, but I can't get the queries unpacked.

Within the SysQueryForm class there is the loadQueryPack method, but I can't really get any further with the loaded container from the usage data.

Does anyone of you have an idea how I can achieve the goal.

I can also provide some more information if needed.

greeting
Stefan

  • Stefan Wojtas Profile Picture
    Stefan Wojtas 550 on at
    RE: Display query string from usage data

    Hello Martin,

    thanks for your answer, but unfortunately it doesn't seem to be an instance of QueryRun.

    There can also be multiple saved queries in this container.

  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: Display query string from usage data

    Unfortunately I don't remember the solution in AX 2012, but isn't it a packed instance of QueryRun class? If so, you can unpack it by QueryRun qr = new QueryRun(sysLastValue.Value).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans