Notifications

15 views

Description

Users can add reports to Homepage or Dashboard via "Add to Dashboard" option as shown in the below screenshots,

Classic UI:

New UI:

However, some business scenarios demand only reports, not the homepage or dashboard. In these cases, you might want to restrict the visibility of the "Add to Dashboard" option from all the users.

Resolution

We don't have any supported property/configuration available to remove the "Add to Dashboard" option from the reports.

Possible Workaround

Identified below community post, which talks exactly about this requirement of hiding the "Add to Dashboard" option and it has a workaround with a global UI client script.
https://community.servicenow.com/community?id=community_question&sys_id=203f87e1dbdcdbc01dcaf3231f9619e0

Global UI script from community article and it appears to be working only for the classic report UI and below enhanced script works for both classic and new report UI's.

API Name: Hide Add to dashboard option
Application: Application
Global: true
Active: true

Script:
window.addEventListener('load', reportVisitorStyle());

function reportVisitorStyle(){

window.onload = function(){
if(document.getElementById('add_to_homepage'))
document.getElementById('add_to_homepage').style.display = 'none';
else if(document.getElementById('add-to-homepage'))
document.getElementById('add-to-homepage').style.display = 'none';
};
}


Please note that we don't support DOM manipulation. In the future, if you run into any issues with this script, you might need to reach out to our Community for further assistance.

Additional Information

Article Information

Last Updated:2019-11-26 08:15:22
Published:2019-11-26