Visibility of email when additional assignee field is not empty on incident form.

Atchutaram
Tera Contributor

Atchutaram_0-1710833711003.png

 

How can I made this email button visible only when additional assignee is not empty. 

So i have configured the additional assignee should be visible only when state is on hold and on hold reason is not awaiting vendor. so when we fill additional assignee list this email should be visible. How can i get the additional assignee list email or user name on that email template?

 

Best Regards,

AtchutRam

9 REPLIES 9

Hi @Atchutaram ,

get the values from the corresponding field  state and onhold reason.

check  state is onhold, then onhold reason is awaiting vendor 

Hi @Arun_Manoj  

Can we do this in any other way as client script is not working?

Mark Manders
Mega Patron

You can create an onLoad client script like this (on the tables where you want to hide it). Just make sure you add the correct conditions.

function onLoad() {
var assign = g_form.getValue('additional_assignee');
if(assign = '') { 
$('email_client_open').hide();
}
}

 

https://www.servicenow.com/community/developer-forum/hide-compose-email-button-when-record-is-inacti...

 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

hi @Mark Manders , that email, should be visible on when state is on hold and on hold reason is awaiting vendor. In all other states it should not be visible.

Than those are the conditions you need to apply in the onload client script.

You can make it onChange, but then it needs to be onChange for the state and for the additional assignee. Just put it onLoad, because saving it after setting it to on hold, will take care of the loading of the page on your conditions.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark