- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 02:50 AM
Hello Everyone
I have requirement to trigger the notification when work notes updated in sctask and it should have the below value then only it should trigger.
error message 'file share failed' and it should have incident number.
Please suggest me on this.
@Ankur Bawiskar
@SANDEEP DUTTA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 03:26 AM
I already shared how to check 1 value, enhance the logic to check for other
you can use this to print the work notes in email body, why email script is required?
Advanced notification condition
var worknotes = current.work_notes.getJournalEntry(1);
if(worknotes.indexOf('file share failed') > -1 && worknotes.indexOf('Incident number') > -1){
answer = true;
}
answer = false;
Email body:
${work_notes}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 02:56 AM
Did you check the out-of-the-box (OOTB) notification for Incidents?
You can follow the same example and configure a similar notification for SCTasks.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 02:57 AM
you can have notification on sc_task table
Condition: Work Notes Changes
Use Advanced Condition
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 03:16 AM
@Ankur Bawiskar
Thank you for the reply 🙂
We need to check here both text and incident number. if these both available then only we have to trigger the notification.
file share failed
Incident number (INC)
Above these two details getting updated in sctask from another application when server failed.
one more last question, can you please help with email script to get these two value in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 03:26 AM
I already shared how to check 1 value, enhance the logic to check for other
you can use this to print the work notes in email body, why email script is required?
Advanced notification condition
var worknotes = current.work_notes.getJournalEntry(1);
if(worknotes.indexOf('file share failed') > -1 && worknotes.indexOf('Incident number') > -1){
answer = true;
}
answer = false;
Email body:
${work_notes}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader