Hi Team,
I need to create a view showing only the 4 oldest cases without impacting other views.
How can I do that? Any suggestion?
The value of the number of returned records (4) may need to be configurable. How can I do it?
Thank you in advance!
Akrem
*This post is locked for comments
Thank you!
Well, you can't really.. the only option I see might be to create a plugin which would update that query in the pre-operation for retrieve multiple. That's sort of taking it too far, but I am not sure if there are any other options
Thank you Alex and Saad,
The value of the attribute "Top" need to be configurable without access to the FetchXML query each time I need to change it. How can I do that?
Thanks again!
Akrem
Hi Akrem,
there is "count" property in the fetchxml, which is an equivalent of SQL "TOP X":
https://crmtipoftheday.com/2016/09/23/use-top-in-fetchxml/
Unfortunately, you can't specify it for the views just like that, but you might use FetchXML Builder:
Or you might probably just add your entity/view to a new solution, export it, update the query in the customizations.xml file, and import it back.
And yet another option, in case you only need to display those views in the subgrids.. Configure those subgrids to display 4 rows only (yes, there will be a pages then.. but it might be a compromise)
Use top 4 in your fetchxml. Refer this:
Hi, maybe I need to explain better my question.. The records to display is dynamic. So, for example if the view displays the 4 oldest cases: Case 1, Case 2, Case 3 and Case 4. If I delete Case 3 for example, so the view will display Case 1, Case 2, Case 4 and Case 5.
I don't need to change the value of records by page for all views. I need only to change it for that specefic view.
THANKS,
AKREM
What is your purpose for that?
Well, You could add a custom boolean field and set the field for those records you wanna show in your view.
Then create a view for that field.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156