Event trigger from one table to another table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2017 01:45 AM
Hi All,
I have a requirment in which when i click a button a user is inserted in approval table , a default attachment is added to it and a mail is triggered.
My notification is build in a scoped application and my UI action is in Global application.
This i UI action script//
var rec = new GlideRecord('sysapproval_approver');
rec.initialize();
rec.approver = current.xuz;
rec.state= "requested";
rec.source_table = "x_test;
rec.insert();
GlideSysAttachment.copy("sys_properties", "6aac69414fc9e64079ed188af110c75c", "sysapproval_approver", rec.sys_id.toString());
//gs.eventQueue("abc_notification", rec,rec.approver );
current.state = 12;
//update current state
current.update();
action.setRedirectURL(current); // stay on this form
Through this a user is getting inserted in approval table with the default attachment but i am not able to understand how i can trigger a event as my UI action is not running in approval table. It is running on a custom table.
Please help..
Thanks,
Ankita verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2017 03:48 AM
Hi All,
I used Business rule and added the script to add the attachment and event in that.
Also through UI action, i auto populated a field name in approval table and used that condition in Business rule with my custom table.
So it worked only on the condition when i clicked the button.
It worked fine.
Thank you all for your help.
Ankita Verma