TMACUL

http://www.servicedeskusers.com/SPELL_CODE_to_Make_ACT_/_EVT_INTERNAL.

Blog Post created by TMACUL Champion on Jan 1, 2016

SPELL CODE to Make ACT / EVT INTERNAL

 

From SDU

Jump to: navigation, search

 

The requirement is that whenever an event / activity is performed - e.g. SLA VIOLATION - then that activity should be logged as Internal so that Employees would not be able to view it. If new activities are added - e.g. UPDATE FIELD - to ticket (CR) who's SLA is already violated then log that activity as Internal. To achieve the above requiremtn I have written two mod and spel files.

  1. MOD File (zactint.mod)
MODIFY alg POST_VALIDATE zevt_set() 125 FILTER( EVENT("INSERT")) ; 
  1. SPEL File (zactint.spl)

//method zevt_set()

//Sets the EVENT of SDMr12.1 as internal =>1

//author: adi : adi_g001@yahoo.com

//********************************************************

 

alg::zevt_set( ... ) {

  logf(SIGNIFICANT, "SPELL zevt_set %s",type.code);

if(type.code == "EVT")

{

send_wait(0, this, "call_attr", "internal", "set_val", 1,"SURE_SET");

if ( msg_error() ) {

  logf(ERROR, "Error initializing object:%s",msg[0]);

return;

  }

}

logf(SIGNIFICANT, "SPELL zevt_set %s",internal);

}


Save the above files in $NXOOT/site/mods/majic folder and bounce the SDMr12.1 services.


--Mitu 01:54, 31 January 2010 (MST) Of course, it is much simpler to actually mark the 'Event Occured' Activity type as Internal from the Administration ('Notifications->Activity Notifications') and no customization is needed.

Retrieved from "http://www.servicedeskusers.com/SPELL_CODE_to_Make_ACT_/_EVT_INTERNAL"

Outcomes