- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 03:33 AM
Hi, I'm quite new to the snow dev platform and have a simple request that I can't seem to get it to work correctly: I need to create an automatic work notes (e.g. say “This is an auto-generated message") when an incident of category Network is created by user. How/where do I do it?
I've tried adding in the business rule but doesn't get it to work.
A related question: if I assign this Network incident to a group automatically upon submitting the ticket, can the work notes be created automatically based on the group that I have pre-assigned instead of checking the category?
Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 04:02 AM
Hi Antonie,
If you're new to the platform and coding in general, I'd go with a flow designer approach to meet your needs.
1. You'd use a trigger of created and then your condition of category is Network
2. Can then use a simple Update Incident Record action to add a work note
3. Not sure if I understand your additional question but if you're wanting to set the assignment group based on the fact the user set the category to network, you'd just add another field to the Update Incident Record action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 05:23 AM
Hi Antonie,
You can use onSubmit Client Script:
function onSubmit() {
var groupSysId = '9040c7d42fd6181092ac235df699b602'; //sysId of Group
var category = 'network';
if ((g_form.getValue('category') == category) ||
(g_form.getValue('assignment_group') == groupSysId)) {
g_form.setValue('work_notes', "This is an auto-generated message");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 06:14 AM
Hi Akshay, may I know where I can add this onSubmit() or onChange() methods in the portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 06:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 06:40 AM
Thanks Akshay, but the work notes is not shown onto the record when i check it again..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 06:43 AM