how can i show only active users on sys_user.list table using a business rule!!!

Charls Brown
Tera Expert

how can i show only active users on sys_user.list table using a business rule!!!

1 ACCEPTED SOLUTION

Please Mark as CORRECT / Answered


View solution in original post

22 REPLIES 22

well if you want to use Business rules you can create one using   script current.addQuery("active","true"); in the advance script and when is before and query is checked and table should be user (sys_user) table.



thank you


Please mark correct if applicable


This before query business rule for user table already exists out of box which shows only active users for non-admins. You shouldn't need to write another one.


yes what is said is right but that would involve roles related to admins and as customizing OOB setting is not a right way, it can be done by creating a new business rule. i dont think there will be a conflict when both are ran as the OOB one is for non admins.



Thank you


arnabbose
Tera Expert

carlosbello Write a BR with below code:



var tm = '';


var as = new GlideRecord('sys_user');


  as.addQuery('active','true');


  as.query();


  while(as.next())


  {


      tm += as.name +',';


  gs.addInfoMessage('ACTIVE User List : " +tm);


}


find_real_file.png