Forums

HDU- A Service Desk User Community :: Forums :: r12 :: Customizations
 
<< Previous thread | Next thread >>
Notification for one status in CO
Moderators: Admin, 4uTech CEO
Author Post
emayer
Fri Jan 29 2010, 03:13PM
Registered Member #2421
Joined: Thu May 10 2007, 09:35AM
Posts: 109
I have customize status in Change Order and I need to configure notification for this status. Such as whenever a change order is changed to this status, a email will be sent to the related group etc. I configured activity notification for this status, and configured email notificaiton to related group under Object Contact. But there is no email sent to the group when CO was change to this status. Any suggestion?

Thanks,

elaine
Back to top
4uTech CEO
Mon Feb 01 2010, 01:35PM
CEO 4uTechnologies, Inc.

Registered Member #150
Joined: Mon Aug 16 2004, 03:58PM
Posts: 3904
//here is your mod file: please change the 'PE' to the code of whatever Change status you are working with. As always try this on a test system first.

MODIFY chg { POST_VALIDATE z_Attach_Pending_Event_Notify() 110 FILTER status { -> 'PE' }; };




//And this is the .spl file (z_Attach_Pending_Event_Notify.spl), is like this:

chg::z_Attach_Pending_Event_Notify(...)

{

// Attach the event if the Change Requests status is "Pending".

if (status == "PE") {


object group_leader;
object attached_events_table_record;



// Attach the event to the call by creating a record in the Attached_Events table.

send_wait(0, top_object(), "get_co_group");

if (msg_error()) {
logf(ERROR, "z_Attach_Pending_Event() - Notify End User: error '%s'", msg[0]);
return;
}

group_leader = msg[0];

send_wait( 0, top_object(), "call_attr", "atev", "get_new_dob", NULL, NULL, group_leader);

if (msg_error()) {
logf(ERROR, "z_Attach_Pending_Event() - Notify End User: error '%s'", msg[0]);
return;
}

attached_events_table_record = msg[0];

// Now we init the record.

attached_events_table_record.obj_id = persistent_id;

// attach 'notify end user status pending' event (multiple notification macro) make sure you know the persid of the evt you created
attached_events_table_record.event_tmpl = "evt:400150";

send_wait(0, group_leader, "checkin");


if (msg_error()) {
logf(ERROR, "z_Attach_Pending_Event() - Notify End User: Cannot create record in 'Attached_Events' table.\n");
}
else {
logf(SIGNIFICANT, "z_Attach_Pending_Event () - Notify End User: 'Pending Event is attached to Change Request'%s'.\n", chg_ref_num);
}
}



}


Specializing in Service Desk
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

This site is not affiliated with CA. All trademarks are © their respective owners. All other content is © HelpDeskUsers.com and 4uTechnologies, Inc.
4uTechnologies, Inc. reserves the right to content contained within this site.
{THEMEDISCLAIMER}