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

Simple query form reset ranges

(2) ShareShare
ReportReport
Posted on by 621
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?
 
  • Layan Jwei Profile Picture
    8,329 Super User 2026 Season 2 on at
    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
    621 on at
    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
    621 on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 523 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 408 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 354

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans