Remove User Preference section from Service Portal

sreejith05
Giga Expert

Hi Team,

Please help me to remove the User preference section from the service portal. Rest all i need to keep as it is. 

find_real_file.png

1 ACCEPTED SOLUTION

Ashutosh Munot1
Kilo Patron

HI,

You will have to clone user profile widget and then edit the code. You have to set data.preferencesEnabled.preferencesPanelEnabled to false always.

 

find_real_file.png

 

Above is the HTML. To set that variable false go to Server Script and set it to false.

find_real_file.png

See above code lines to set preferencesPanelEnabled  as false.

find_real_file.png

 

Change below line of code

preferencesPanelEnabled : GlideStringUtil.nil($sp.getParameter('sys_id')) || $sp.getParameter('sys_id') == gs.getUserID(),

to

preferencesPanelEnabled : false,

 

 

Thanks,
Ashutosh Munot

 

View solution in original post

3 REPLIES 3

Ashutosh Munot1
Kilo Patron

HI,

You will have to clone user profile widget and then edit the code. You have to set data.preferencesEnabled.preferencesPanelEnabled to false always.

 

find_real_file.png

 

Above is the HTML. To set that variable false go to Server Script and set it to false.

find_real_file.png

See above code lines to set preferencesPanelEnabled  as false.

find_real_file.png

 

Change below line of code

preferencesPanelEnabled : GlideStringUtil.nil($sp.getParameter('sys_id')) || $sp.getParameter('sys_id') == gs.getUserID(),

to

preferencesPanelEnabled : false,

 

 

Thanks,
Ashutosh Munot

 

Hi Ashutosh,

I have a similar kind of requirement. It would be great if you can help me on this.

Eg: There are users with company A & B. If the user from A logins it should display the manager as 'My manager' in the User profile and if User from company B logins, it should display as 'My approving manager'. 

I have cloned the existing widget and made a few changes. I need clarification on below items.

1. If I chose any one widget to the user profile, how will the another widget gets displayed?

2. I updated a server script in the script editor. How should I pass this to the client side.

I have attached a screenshot, Kindly ignore if my code is wrong as Iam new to scripting service portal.

sreejith05
Giga Expert

Thank you so much it works