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 :
Microsoft Dynamics AX (Archived)

How can I make a query range editable?

(0) ShareShare
ReportReport
Posted on by 140

Hi everyone,

I have a code that adds query ranges that sort of look like this:

queryBuildDataSource = query.addDataSource(tableNum(VendParameters));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(VendParameters,BPIAccountNum));
queryBuildRange.value(bankAccountNum);

I tried to add queryBuildRange.enabled(true) but didn't work.

My requirement is that user can also edit its value.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rachit Profile Picture
    4,015 User Group Leader on at

    Hi Mark,

    You can set the range status as Open,Lock or hidden by assigning the value in range status method. If you want the range value to be editable then you must prompt() the query. You can refer to many standard examples where query prompts are used.

    Hope that helps.

  • André Arnaud de Calavon Profile Picture
    303,995 Super User 2026 Season 1 on at

    HI Mark,

    Please specify where this coding is used and how users are starting your process. Do they get a dialog?

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    The range will be visible if you have a form, and you access one of the datasources in their own methods with this.queryBuildDataSource(), for which you could apply the range. Then access/visibility is controlled there as Rachit has mentioned with rangeStatus.

    Since you do have a query object listed in your code, you are either doing this in a table/class/job or an isolated method on a form where you construct a new query, or you are doing it in the form correctly however in that case you should not construct a new Query object, but use the one accessible during runtime.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans