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

Community site session details

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

Simple query form reset ranges

(2) ShareShare
ReportReport
Posted on by 561
Hi all, I am doing the development of this simple query so that, when entering the SalesLineOpenOrder form it contains those filters. However, this form already has a number of filters predefined, which are maintained even though I add these. Is there any way to reset them at code level from the simple query by doing an override of some method?
 
I have the same question (0)
  • Layan Jwei Profile Picture
    8,060 Super User 2025 Season 2 on at
    Simple query form reset ranges
    Hi Jesus,
     
    Do you mean the form has this query as datasource?
     
    Can you please take screenshots and shows us the form?
    and show us the code you added if there is any?
  • Jesús García Profile Picture
    561 on at
    Simple query form reset ranges
    No, it isn't.  The SalesLineOpenOrder form use SalesLine like main DataSource and by default it has 3 ranges: SalesType = Subscription (TIPO = SUSCRIPCION) ,SalesType = Sales  (TIPO = PEDIDO DE VENTAS)and SalesType = Returned order (TIPO = PEDIDO DEVUELTO). SalesType = Sales it not a problem, cause is the case im going to use like main range, but the others need to be reseted. 
    I think that i've found a way to do it but i need to try it. I tought to override the init method of Simple Query, get the actual query (the query that the form is using), then call clearRanges method and finally, add the same ranges i did in the image of the first post, but this time by code.
  • Verified answer
    Jesús García Profile Picture
    561 on at
    Simple query form reset ranges
    Hi, I finally took the following solution: the ranges that I used in the simple query I added them in the clicked method of the Tile, so that when entering the form it would add the filters. Previously, I call the clearRanges method to remove the predefined filters from the form. The idea would be like this:
    This way, I don't have to use the simple queries and I can add the filters I need to the Tile.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 703 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 582 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 542

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans