If user dosn't have requests menu should not appear

Sweta24
Tera Contributor

Hi 

 

Kindly help me If user dosn't have requests menu should not appear , please help me on this condition or code?

 

Sweta24_0-1711780324559.png

 

3 REPLIES 3

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hi @Sweta24 

These tab come from menu items (sp_rectangle_menu_item)

There will be option to script the condition if you open the record.

You can write a script include and call it from the condition option.

 

please mark this answer as helpful and correct if helped.

Kind Regards,

Ravi Chandra.

Kindly provide the script include code and condition , i have requested question for the code only

Ravi Chandra_K
Kilo Patron
Kilo Patron

Something like this:

var grIncident = new GlideRecord('table'); //give table name

grIncident.addQuery('requested_for', gs.getUserId()). // Or any associated field 

grIncident.query():

if(grIncident.hasNext())

return true;

 

please mark this answer as helpful and correct if helped.

 

Kind Regards,

Ravi Chandra.