applying UI Policy only for specific user group

ody
Tera Contributor

Hi,

how to write a filter condition based on current user group membership when applying UI policy.
the filter condition is: if current user is member of group X, then do apply some UI policy

I found a code snippet:
if(gs.getUser().isMemberOf(group_X_sys_id)){
//Do something...
}

but how do I put the code into the condition filter box?

 

 

Thank you

16 REPLIES 16

Spelling is important. The above code works - but you have to spell g_scratchpad correctly.

there is a "c" between the "t" and "h".

Hi 

You need to use Client Script in this case.

This would make you work easy.

Call the Script include in client script using GlideAjax.

Do it like this;

Do following changes in your Script Include;

1.)Make it client callable

2.) Your include should start like this,

var SI_name= Class.create();
SI_name.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {

func_name:function()

{

//your code

}

}

var ga = new GlideAjax('your_script_include_name');

ga.addParam('sysparm_name','your_SI_function');

ga.getXML(responseFunction);

function responseFunction(response)

{

//and make your changes

}

 

Mark Correct if it helps.

Warm Regards,

Omkar Mone

find_real_file.png

www.dxsherpa.com