GetRowCount is not best practice, instead use GlideAggregate
see getrowcount
example:
var agg = new GlideAggregate('sc_req_item');
agg.addQuery('request', '3eac6cbddb75a81081fb49a2399xxxxx');
agg.addAggregate("COUNT");
agg.query();
if (agg.next()) {
var answer = agg.getAggregate("COUNT");
gs.print(answer);
}
Comments
Post a Comment