Sometimes for certain implementation, is it required to send to send towards the end-user a notification with the solution. And this at closure time.
Sending the solution at the time we create it, is far easier. It's done like sending out 'Log Comments'.
This is how we implement this. We presume that other possible way's are possible.
1. | Create a Perl file, named mail.pl
|
||
3. | Go to Administration - Service Desk - Application Data - Remote References.
Be aware that you need to use double back slahs. |
||
4. | Go to Administration - Events & Macros - Macros |
||
5. | Go to Administration - Events & Macros - Events |
||
6. | Use the Schema Desinger to add the trigger to the cr table. POST_VALIDATE zcr_attach_closed_events() 90 FILTER(status { -> 'CL'}); |
||
7. | Create your spl file cr::zcr_attach_closed_events(...) { object group_leader; object attached_events_table_record; send_wait(0, top_object(), "get_co_group"); if (msg_error()) { logf(ERROR, "%s - %s", ref_num, msg[0]); } group_leader = msg[0]; send_wait( 0, top_object(), "call_attr", "atev", "get_new_dob", NULL, NULL, group_leader); if (msg_error()) { logf(ERROR, "%s - %s", ref_num, msg[0]); } attached_events_table_record = msg[0]; attached_events_table_record.obj_id = persistent_id; attached_events_table_record.event_tmpl = "evt:NNNNNNN"; send_wait(0, group_leader, "checkin"); if (msg_error()) { logf(ERROR, "%s - failed to attach event 'NNNNNNN' via the zcr_attach_closed_events script", ref_num); } else { logf(SIGNIFICANT, "%s - successfully attached event 'NNNNNNN' via the zcr_attach_closed_events script", ref_num); } } |