How to sort created on fields using query?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 02:48 AM
How to sort created on fields using query?
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 02:58 AM
You can order by created on in glide query by the below function -
gr.orderBy('sys_created_on');
Mark if it is helpful or correct, feedback is appreciated
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 03:41 AM
Hi Upasana,
If you want to sort the records in ascending order then use below script in the glide record query:
gr.orderBy("sys_created_on");
If you want to sort the records in descending order then use below script in the glide record query:
gr.orderByDesc("sys_created_on");
Thanks,
Mihir