Business rule is not running for users

malaisamyj
Tera Contributor

Hi All,

I have written a business rule, for triggering an notification as below,

But its not working for the end users. But its working for the admin. What could be the issue?

(function(){

var gr = new GlideAggregate('x_isgi_isg_governa_pm_slasum');

gr.addEncodedQuery('sla_id.slt_id.master_contract_id.sup_id.supplier=TCS^serv_monONLast month@javascript:gs.beginningOfLastMonth()@javascript:gs.endOfLastMonth()');

gr.addAggregate('COUNT','sla_id.slt_id.master_contract_id.sup_id.supplier');

gr.setGroup(false);

gr.query();

while(gr.next()){

var gr1 = gr.getAggregate('COUNT','sla_id.slt_id.master_contract_id.sup_id.supplier');

gs.addInfoMessage(gr1 + 'GlideAgrregate Count');

var gr2 = new GlideRecord('x_isgi_isg_governa_pm_slasum');

gr2.addEncodedQuery('sla_id.slt_id.master_contract_id.sup_id.supplier=TCS^serv_monONLast month@javascript:gs.beginningOfLastMonth()@javascript:gs.endOfLastMonth()^s_wf=6');

gr2.query();

if (gr1 == gr2.getRowCount()){

gs.addInfoMessage('full');

gs.eventQueue("x_isgi_isg_governa.TC submission full",current);

}

else if(gr2.getRowCount() > 0 && (gr2.getRowCount() > gr1*0.50 && gr2.getRowCount() < gr1*0.52) ){

gs.eventQueue("x_isgi_isg_governa.TC submission par",current);

gs.addInfoMessage(gr2.getRowCount() + " getrow count");

}

}

})();

User has all rights. My custom table is extended to Task table..Is there any issue with the code. Why for end users its not triggering notification and only working with admin id

Thanks,

Malaisamy

6 REPLIES 6

I have checked and removed the role.. But still Its not working..



Do we need to assign any role for triggering event?



Thanks,


Malaisamy


adityaghosh
Tera Guru

Please check any ACL for that table by elevating your role as security_admin.



There must be some ACL..