How to create Email notification previous priority and present priority for task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 08:43 AM
For Priority it should show if its raised or lowered depending on the previous task state.
for example:
SCTASK# followed by Task short description
“Priority raised to:” or “Priority lowered to:” followed by the Priority as shown above
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:31 AM
Hello Jagan ,
Please follow below Steps to Achieve your requirement
1. Create Event in Event registry
2. Create Notification
3. Create email script - I have named sc_task_priority and called to email body - you can do the same
function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
template.print("The Priority of this Task has been changed from Priority:" + event.parm1 + " to Priority:" + current.priority);
})(current, template, email, email_action, event);
4. Create Business rule
After - update BR
gs.eventQueue("priority_change_in_sc_task", current, previous.priority, gs.getUserId());
- paste above code in Advance section of the script
If it helps please click Accept as Solution/hit the Thumb Icon if applicable
Regards,
Shyamkumar
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2022 05:52 AM
Hello @snow jagan ,
have you tried my solution?
Revert if you need any assistance.
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2023 12:51 AM
hey @shyamkumar VK
it worked but i need to pass value of field but here I'm getting sys id how can we meet the exact requirement?
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 01:03 AM
Hi Shyam,
As Weenie27 said this solution gives us the sys id for the old priority.