Problem - State visible only for particular group

nameisnani
Mega Sage

Hi Team ,

 

We have a requirement on Problem table 

 

Ptask - " complete " Ui Action should be only visible to certain group .

Problem - " Resolve" Button should be only visible to certain group . 

 

Example group - ' Sbc_prb_grp'

 

nameisnani_0-1712043519904.pngnameisnani_1-1712043573960.png

 

 

Can anyone please help me with steps and Please provide screenshots .

 

Please provide configure steps and screenshots.

 

Thanks in Advance .....

 

 

16 REPLIES 16

Sandeep Rajput
Tera Patron
Tera Patron

@nameisnani You can control the visibility of the UI Action either by checking the condition on the condition field or by adding the required role on the role list.

 

Screenshot 2024-04-02 at 1.22.00 PM.png

Rohit99
Mega Sage

Hi @nameisnani 

Follow the steps:

1.Write Script Include and copy the following code.

complete_button : function()
{
    var gr = new GlideRecord('sys_user_grmember');
    gr.addQuery('group','Enter Group Sys_id');
    gr.addQuery('user',gs.getUserID());
    gr.query();
    if(gr.next())
    {
        return true;
    }
    return false;
}
 
2.Open the Complete UI Action follow the pattern in Condition field.
new script_include_name().function_name()  
 
3.Follow same steps for Resolve UI action