Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Simple query form reset ranges

(1) ShareShare
ReportReport
Posted on by 297
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?
 
  • Verified answer
    Jesús García Profile Picture
    Jesús García 297 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.
  • Jesús García Profile Picture
    Jesús García 297 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.
  • Layan Jwei Profile Picture
    Layan Jwei 7,255 Super User 2024 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?

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans