
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
I have seen many threads on community where user wants to add some functionality over email to do some delete or update operation over the record using email notification link.
So i have a one solution hope it will help other.
Scenario: Email link to remove logged in user from watch list.
Solution:
- Create Template ( Email >> Templates ).
- Update mailto template on notification.
- Update existing reply type inbound action using some server side scripts
Screenshot for reference:
Templates:
Notification: Here i have called the mailto into the notification
Inbound Action: For testing i have just updated ootb reply type inbound action.
gs.include('validators');
if (current.getTableName() == "incident") {
var gr = current;
if (email.subject.toLowerCase().indexOf("please reopen") >= 0)
gr = new Incident().reopen(gr, email) || gr;
gr.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
if (gs.hasRole("itil")) {
if (email.body.assign != undefined)
gr.assigned_to = email.body.assign;
if (email.body.priority != undefined && isNumeric(email.body.priority))
gr.priority = email.body.priority;
if(email.subject.toLowerCase().indexOf("watchlist") >= 0){
var aUtil = new ArrayUtil();
var id = [gs.getUserID()];
var wlist = gr.watch_list.toString().split(',');
gr.watch_list=aUtil.diff(wlist,id).join();
}
}
gr.update();
}
Result: You will see the link over the email notification which will allow you to update the action over the record.
Just want to add another point here, this scenario has been tested if you want to perform any other operation so just make some changes in inbound action and fulfill your requirement. Hope it will help you.
Thanks,
Harshvardhan
- 1,811 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.