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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Add range in View object using X++

(0) ShareShare
ReportReport
Posted on by 124

Hello everyone, how to set value in range using X++?

I also check the available override methods, which method should I put addRange?
pastedimage1634010004867v1.png

I want to put value here using X++ code

pastedimage1634010091967v2.png

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,124 Most Valuable Professional on at

    Views are synchronized to database, therefore you can't change them at runtime.

    But you can use a query to fetch data from the view, and you can easily add ranges to the query.

    Query query = new Query();
    QueryBuildDataSource ds = query.addDataSource(viewStr(MyView));
    ds.addRange(fieldNum(MyView, MyField)).value(queryValue(...));

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 258 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans