Does orderby query work for sys_created_on field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 02:49 AM
Does orderby query work for sys_created_on field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 02:58 AM
yes, it does.
I am not sure what issue are you facing, but you can also order on the number field also as it will always be in incremental order only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 02:59 AM
Yes, please write the code -
gr.orderBy('sys_created_on');
Mark if it is helpful or correct, feedback is appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 03:55 AM
Hi Upasana,
Yes orderBy() works on sys_created_on field.
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