- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2018 02:25 AM
Hi All,
I have a query.
currently in our system we have gliderecord in script which basically counts using getrowcount and also deletes junk records .
We want to usse glideagrregate to count, so this entire functionality using glideagrregate can this be achieved?
Thanks,
Abhinab
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2018 05:51 AM
If you are deleting records, then there is no performance gained by using GlideAggregate. They are going to do the same thing in the end. The only performance gained is using GlideAggregate's count over GlideRecord's getRowCount() for simply count operations.
My recommendation is to use GlideRecord, getRowCount() to count the records and deleteRecord() to delete them in the same server side script. If you use GlideAggregate with deleteRecord(), you're going to confuse someone somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2018 12:37 AM
How about useing gliderecors to delete using one object gr , and using glideagrregate GrAg for counting. will it make differnce ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2018 12:40 AM
Like Chuck already mentioned, if you're using the count once, you're better with getRowCount() as your script will be easier to read and maintain.
How many records do you need to delete in general and how many times do you need to count?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2018 01:36 AM
Its a scheduled job and it will have atleast more number of records to cleanup knowledge artcile which are no longer using.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2018 05:47 AM
I don't know if I would delete the records. You might be better off setting the status to unpublished/retired so you still have the information, but not deleted and gone forever - just inaccessible to the masses.
Use delete VERY cautiously. There's really no penalty for keeping obsolete information around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2018 05:45 AM
GlideAggregate is an extension of GlideRecord indeed so yes it supports same methods. The difference appears if you start adding Aggregate methods.