Need to hide "reply All" and "forward" option from Activity Log. can anyone help.

sukirtighosh
Tera Guru

Hi,

 

I need to hide "Reply All" and "forward" option from Activity log. I already looked for "email_reply" OOB UI Macro, and commented the code lines for " Reply all" and "forward" option, but it's still not working. Can anyone help please:

 

find_real_file.png

Looking forward to your responses.

 

Regards

Sukirti

1 ACCEPTED SOLUTION

Mahendra RC
Mega Sage

Hi Sukirtighosh,

Could you please try the below code in onLoad client script to hide the 'Reply All' and 'Forward' buttons:

function onLoad() {
   $j('button[reply-type="replyAll"]').toggle();
   $j('button[reply-type="forward"]').toggle();
}

since I don't see any id for these 2 buttons when I do inspect element in UI 16 as shown in below screenshot. so I tried to hide these buttons by 'reply-type' attribute value:

find_real_file.png

you will be able to see only reply button once the page is loaded as shown in below screenshot:

find_real_file.png

Please mark it correct/helpful, if it resolves your problem.

Thanks

View solution in original post

12 REPLIES 12

If the system property is just to enable that functionality it seems like there is no config.  This is the first time I have seen this functionality.  I have always just used comments or the formatted email to respond to comments left by the customer.

Definitely not best practice but you may be able to an on-load script to do DOM manipulation to remove these.  An example of the code is below.  You can use inspect from the browser to find the correct element ID.

document.getElementById('order_now').style.display='none';

Hey Brian,

 

I tried the onLoad script but it didn't work. Please find the code scree shot as below:

 

Yes I have been trying that as well in my personal dev and have not been able to get it to work.  I would suggest contact ServiceNow (HI ticket) and seeing if there is a way to do this in UI 16.

Mahendra RC
Mega Sage

Hi Sukirtighosh,

Could you please try the below code in onLoad client script to hide the 'Reply All' and 'Forward' buttons:

function onLoad() {
   $j('button[reply-type="replyAll"]').toggle();
   $j('button[reply-type="forward"]').toggle();
}

since I don't see any id for these 2 buttons when I do inspect element in UI 16 as shown in below screenshot. so I tried to hide these buttons by 'reply-type' attribute value:

find_real_file.png

you will be able to see only reply button once the page is loaded as shown in below screenshot:

find_real_file.png

Please mark it correct/helpful, if it resolves your problem.

Thanks