Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

using view as query in dialog class

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi 

i am creating a dialog class and i need to iterate over data of one view.

how it can be done without creating query of that view.

Thanks in advance for help

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: using view as query in dialog class

    Thank you Sergei for help.

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: using view as query in dialog class

    Hi villwd1,

    Depends on the framework you would like to use (RunBase or SysOperation) there are different approaches?

    For RunBase you can check class Tutorial_RunbaseForm as example

    For SysOperation framework you can check article robscode.onl/.../

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: using view as query in dialog class

    No i don't want to iterate by creating Query of view in AOT.

    i want to use view directly as query so that i can use

    while(queryRun.next())

               {

               }

    to iterate in and perform some operation on related table of view

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: using view as query in dialog class

    Hi villwd1,

    If you mean how to iterate over data in run method without creating a query object, it similar to tables: declare view variable and use while select

    MyView myView;
    
    while select myView
    {
        info(myView.MyField);
    }

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,401 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans