Hide Activity and comments in requested item

Tadz
Tera Guru
Tera Guru

Hi is there a way to hide:

  • Activity Field
  • Update and Delete Buttons
  • comments field

In requested item?

Capture.PNG

Thanks,

Tadz

11 REPLIES 11

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

If you don't want them at all. I would recommend removing the field from the form. If you look a bit futher for UI16 (Which you ain't using on your screen shoot) it might be a bit harder to hide, since the tied the comments/work notes into the acitivity log...



//Göran


The problem with doing that is that my default view is used by ITIL users, who also log incidents. They need to still see this field.



I was hoping I could dynamically remove this field, as with all other fields on the form, but this looks to now be some fancy part of the activity stream instead of a native field - dissapointed!


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hmm... You could be able to hide it with ACLs, haven't tried it thou.



//Göran


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

about hiding the buttons, you can do something like this which hides the update & save buttons.



You can put this in a UI policy:



function onCondition()


{


// Get a list of button elements


  var bottomButtons = document.getElementsByClassName('form_action_button action_context');


    for (var i=0; i<bottomButtons.length; i++)


  {


      // Check for the update or save button


  if (bottomButtons[i].getAttribute('id') == 'sysverb_update' || bottomButtons[i].getAttribute('id') == 'sysverb_update_and_stay' )


  {


      // Hide the button


      bottomButtons[i].style.display = 'none';


  }


  }


}


Kalaiarasan Pus
Giga Sage

Not sure if I understand this properly



Do you want to hide activity formatter? For all users? or for some ?


For button, can't you change the conditions of the UI actions and hide those?