Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to use GlideAjax in Read ACL instead of GlideRecord

Renu9
Tera Contributor

i All,

 

I m having the below read ACL on RITM table Description field. As part of health scan, glide record should not be used, and need to replace with Glide Ajax. I am new to Glide Ajax, could anyone please guide me how to replace the below read ACL.

 


var appgr;
grd= new GlideRecord('sysapproval_approver');
grd.addQuery('document_id', current.sys_id); //Fetching for approval record
grd.query();
while(grd.next())
{
appgr= grd.group.assignment_group;
if(gs.getUser().isMemberOf(appgr)) //checking if loggedin user is member of approval gr
{
answer= true;
}
}

if ((gs.getUser().hasRole('u_confidential')) || (sc_req_item.opened_by == gs.getUserID()) || (sc_req_item.request.requested_for == gs.getUserID()))
{

answer = true;
}

3 REPLIES 3

ricker
Tera Guru

@Renu9,

You can't.  Glide Ajax is for Client Scripts.  ACL scripts run on server side.

 

Renu9
Tera Contributor

Hi @ricker ,

Ok, What is the other approach to be used in ACLs other than Gliderecord , GlideAggregate to fetch the data.

We are strongly used not to use Gliderecord in ACLs.

@Renu9,

I don't think there is one.