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 :
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
    301,194 Super User 2025 Season 2 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

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans