GetRowCount() versus GlideAggregate

 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

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously