Want to hide "My Coworkers" section from esc service portal My Profile

rmaroti
Tera Contributor

Hi Everyone,

 

I want to hide "My Coworkers" section from esc service portal  user my profile as highlighted in yellow color below screenshot.

rmaroti_0-1746424914757.png

 

please suggest me how to hide it ?

 

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@rmaroti 

Did you check the widget "User Profile"?

It calls another widget "sp-my-team"

Steps to follow

1) simply make a copy of team widget, comment that line which shows co workers

AnkurBawiskar_0-1746426431280.png

 

2) then clone User Profile widget and update this line in server side script and add your newly created custom widget id here

 

AnkurBawiskar_1-1746426535729.png

 

3) then add this cloned User Profile widget to that OOTB portal page

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

@rmaroti 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@rmaroti 

Did you check the widget "User Profile"?

It calls another widget "sp-my-team"

Steps to follow

1) simply make a copy of team widget, comment that line which shows co workers

AnkurBawiskar_0-1746426431280.png

 

2) then clone User Profile widget and update this line in server side script and add your newly created custom widget id here

 

AnkurBawiskar_1-1746426535729.png

 

3) then add this cloned User Profile widget to that OOTB portal page

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Suhaibsayyad007
Tera Contributor

The simplest way to hide the “Colleagues” section is by adding a small piece of custom CSS. Follow these steps:

Navigate to:

All > Service Portal > Themes
Select the active theme for your portal.
(The default for the ESC portal is usually EC Theme.)

In the Related Lists section, click "New" under CSS Includes.
Fill in the details:

Name: Any name you prefer (e.g., ec-custom-css)
Source: Style Sheet

In the Style Sheet reference field, click the magnifying glass and then "New" to create a new style sheet.

Name the style sheet (e.g., custom-css) and in the CSS field, paste the following code:

#colleagues {
display: none !important;
}

Save all changes, then reload the ESC portal.

The “Colleagues” section should now be hidden from view.

Alternative Method
You can also achieve this by customizing the widget directly. This is more flexible but involves editing widget code, which may be more complex depending on your requirements.

If this solution helped, please click "Accept as Solution" and mark it as "Helpful."
Doing so supports the community and helps others find working answers more easily.

Ankur Bawiskar
Tera Patron
Tera Patron

@rmaroti 

Something like this, I haven't tested but this is how you can proceed and enhance

Changes done to the cloned team widget, I added the style="display:none" to hide co workers html element, line 31

AnkurBawiskar_1-1746427333031.png

 

Then added this newly created team widget in cloned User profile widget, line 91 in server side

AnkurBawiskar_2-1746427448571.png

 

Then add this newly cloned user profile widget to the "user_profile" portal page

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@rmaroti 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader