- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 12:22 PM
Hello Community,
I have created an event that gets fired via workflow activity in a workflow that is on the Change Request table. The event generates a notification that fires from the sysapproval_approver table. The notification contains a mail script that looks at the Change Request table to gather information and print it in the notification. I also attempted to create approve/reject links using the ${mailto:mailto.approval} and ${mailto:mailto.rejection} but they did not associate with a record. Therefore when I clicked the link that was generated, the email subject was simply -approve or -reject. So I had to custom create the approve and reject links and they operate as desired with one exception.
When the notification is fired, it contains all of the information I need. However, the Target shows the actual Change Request record. Therefore, when someone replies to the email notification using the links, it simply updates the Change Request activity log to show that someone replied.
I need to modify the functionality so that the notification that I am generating will update the Change Request approval record when someone replies to the email instead of
just updating the Change Record.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 01:37 PM
Kenneth,
Try to do a GlideRecord and then generate an event using Runscript.
Have a Runscript workflow activity and have a code something like:
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.sys_id);
gr.query();
if(gr.next())
{
gs.eventQueue('<<eventname>>',gr,gs.getUserName(), gs.getUserName());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 01:04 PM
Kenneth,
You are generating the Event from the Change Workflow using 'Create Event' activity which means it thinks that the event was generated from the 'Change' record. Its always better to have you event and email running on same table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 01:27 PM
That makes sense. So, how would I generate the event from a different table(Table A) when something happens on Table B?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 01:37 PM
Kenneth,
Try to do a GlideRecord and then generate an event using Runscript.
Have a Runscript workflow activity and have a code something like:
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.sys_id);
gr.query();
if(gr.next())
{
gs.eventQueue('<<eventname>>',gr,gs.getUserName(), gs.getUserName());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 02:50 PM
I'm going to try this out but I'm having a mailbox created so that I can actually test the approval functionality.