Create drop down value on incident compose mail

ravichanduk
Mega Expert

Hi i need to create a drop down value on incident compose mail 

if i select chioces based on that in body values should auto populate 

for eg if values are like It ok/it not ok/recheck

if i select it ok---then in body its backend value should come 

6 REPLIES 6

Gaurav Bajaj
Kilo Sage

HI,

I don't think only can modify it as it is part of email client processor and its not exposed to anyone.

All you can do is that use "quick message" and add a template you wish to see in the body.

 

find_real_file.png

 

Thanks

Gaurav

can u tell me the process how to do those template

Gaurav Bajaj
Kilo Sage

You can navigate to quick message in the system.

 

Create a new one and add the desired content in it, you can pull dynamic information from the record on which you are sending an email by using ${field_name} in the template.

e.g. I have added short description in the content here.

For more information, please see the mentioned link here.

https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/notification/task/t_QuickMessages.html

 

 

find_real_file.png

 

find_real_file.png

 

Thanks

Gaurav

ravichanduk
Mega Expert

i done using ui script it working fine no issues with that but gaurav also little helpful

var url = window.location.toString();
if(url.indexOf('email_client') > 0 && url.indexOf('incident') > 0)

var obj = document.getElementsByClassName('nav navbar-right pull-right');

var drop_down = "<div class=\"header-content\" style='padding-right:7px'><select onchange='alert(\"Hello\");setBodyTxt(this)' class='btn'><option value=''>-None-</option><option value='Hello Welcome to ServiceNow'>Option1</option><option value='Hello Welcome to Client Mail'>Option2</option></select></div>";
obj[0].innerHTML = drop_down + obj[0].innerHTML;

},1000);
}
function setBodyTxt(obj){
alert('Option Selected:'+obj.value);
$('message.text_ifr').contentWindow.document.getElementById('tinymce').innerHTML = obj.value;
}