How to attach an onSubmit script to work_notes/comments fields in Incident?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 02:42 PM
I can create an onSubmit client script for the Incident view, and it runs if I click "Update" in the top right.
However, it does not run if I use "Post" which is right next to the work_notes and/or comments field in the incident 'feed' section.
How do I connect to this Post button so I can also run my script if that is clicked instead of Update?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 08:33 AM
Thanks for the suggestion about a business rule, but I need to do this on the client side, so I can't use a business rule (or ajax to one to get the value).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 08:35 AM
Can you let me know the use case here? I will see what I can do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 08:39 AM
Sure -- thanks!
I have some sensitive data that would be entered in this field, and I need to transform it to remove anything that is deemed sensitive (think SSNs) on the client side _before_ it is sent to the server at all. Our user's for risk/compliance reasons won't allow this processing to be done server side as they need to ensure it never goes to ServiceNow's infrastructure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 09:06 AM
Hi Ryan,
Sorry, after posting the reply, i tried it without success. So, i deleted
the post immediately. Though conceptually it looked Ok for me, event was
not firing. Possibly activity stream form is a helper form.
Thanks
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 03:09 PM
Any thoughts based on the use case I posted?