Kalaiarasan Pus
Giga Sage

I dont know what you are trying to do but whatever you are doing seems incorrect. You are querying all the company records and updating the count for each record in every update. Is that what you are trying to do?

The field "Open Issue Count" would calculate the number of Vendor Risk Issues
where the Status(state) field is not in Closed Complete, Closed Incomplete, or Closed Cancelled) and populate that row count value in core-company form.

find_real_file.png

I am guessing you need to add this line before first query so that you can get the corresponding company only instead of everything.

gr1.addQuery('sys_id',current.vendor); 

View solution in original post

Ankur Bawiskar
Tera Patron

Hi,

why not make the BR as Async Insert/Update?

Also check suggestion mentioned by Kalaiarasan

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

using getRowCount in server side script is a health scan finding under performance risk category. This likely also needs to be addressed. How to use  Glide aggregate in the above script