Hiding Save button in Reports

bcmc01
Kilo Expert

Folks,

Is it possible to hide 'Save' button in reports? I don't want show this to end users?

1 ACCEPTED SOLUTION

Hello Robert,



Thanks for the help. I am able achieve this using UI script (we can use with client script as well)



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


function reportVisitorStyle()


{




  window.onload = function()


  {


            //get iframe reference and hide elements


            var frame = document.getElementById("Visitor Count2");


            if(frame!= null)


            {


                      frame.contentWindow.document.getElementById('save-report').style.display = 'none';


                      frame.contentWindow.document.getElementById('dropdownMenu1').style.display = 'none';


                      frame.contentWindow.document.getElementsByClassName('main-settings')[0].style.display = 'none';


            }


  };



}


View solution in original post

5 REPLIES 5

rlatorre
Kilo Sage

You will need to modify the "write" ACL on the sys_report table.


My intention is to hide 'Save' button and Table, columns selection section as shown in image. I just want users to modify the query condition if they need. When I disabled write acl on 'sys_report' table, report shows an error message 'Security constraints prevent saving reports - displaying report as read-only' and does not allow users to change query conditions.




Screen Shot 2016-10-31 at 12.02.46 PM.png


I'm not sure ServiceNow allows customers to change that interface. Even with UI Actions. These posting are a little old but might be informative for you. Try contacting your ServiceNow technical consultant or their support department for more information.



Hiding Buttons on Reports


Re: Hide the Export to PDF link in Reports


Remove Buttons From Reports


Hello Robert,



Thanks for the help. I am able achieve this using UI script (we can use with client script as well)



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


function reportVisitorStyle()


{




  window.onload = function()


  {


            //get iframe reference and hide elements


            var frame = document.getElementById("Visitor Count2");


            if(frame!= null)


            {


                      frame.contentWindow.document.getElementById('save-report').style.display = 'none';


                      frame.contentWindow.document.getElementById('dropdownMenu1').style.display = 'none';


                      frame.contentWindow.document.getElementsByClassName('main-settings')[0].style.display = 'none';


            }


  };



}