can we use java script in notification Message HTML part?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 08:14 AM - edited 06-29-2023 11:19 PM
Hi All
can we use java script in the notification Message HTML part?
i need to validate the below script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 08:37 AM
Hi @jobin1
you will have to write notification email script and access the same by using ${mail_script:script name} in the script field.
refer docs: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/script/server-scripting/concept/c_U...
please hit thumb up below and mark the answer as correct if it helped!!
Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 08:37 AM
Hi @jobin1 ,
Instead of writing Javascript code in HTML field create one Email script and in that write your code and call the email script in your email notification HTML part like below.
${mail_script:email_script_name}
Please refer the below link as well.
Please mark my answer as helpful/correct if it helps you.
Regards,
Namrata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 08:40 AM
@Namrata Ghorpad it seems we replied the exact thing with 5 seconds gap 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 11:34 PM
Hi @jobin1
Any feedback on my reply?
If the solution proposed worked for you, if yes mark the answer as correct and close the thread.
Regards,
Ravi Chandra.