The web blog http://www.learnsccd.com strives to be a comprehensive guide to SCCD, TADDM, SERVICE NOW and MAXIMO tools. This is a personal site maintained solely by me. I intend to update it regularly.For live updates please follow us on.

Incident Activity Reassign Notification

Incident Activity Reassign Notification

Create Object launch point with below Object Event Condition and Script Code.

Object Event Condition:

origrecordclass='INCIDENT' and status in ('WAPPR','QUEUED','INPRG') and (:$old_owner <> :owner or :$old_ownergroup <> :ownergroup)

Script Code:

from psdi.server import MXServer
from psdi.mbo import SqlFormat

print "INCACTREASSIGN - BEGIN"

#print "Set Status to Queued"
strstatus = mbo.getString("STATUS")
if (strstatus <> 'QUEUED'):
    mxServer = MXServer.getMXServer()
    mbo.changeStatus("QUEUED", mxServer.getDate(), "")

#pring "Check Owner or Owner Group"
strowner = mbo.getString("OWNER")
strownergroup = mbo.getString("OWNERGROUP")

if (strowner <> '' or strownergroup <> ''):
    #print "Send Email Notification"
    sqlf = SqlFormat("templateid='INCLVL2ASSIGN' and objectname='WOACTIVITY' and status='ACTIVE'")
    commTemplateSet = mbo.getMboSet("$commtemplate", "COMMTEMPLATE", sqlf.format())
    commTemplateMbo = commTemplateSet.getMbo(0)
    if commTemplateMbo is not None:
        commLogMbo = mbo.createComm()
        commLogMbo.copyFromTemplate(commTemplateMbo)
        commLogMbo.sendMessage()
else:
    errorgroup="ACTIVITY"
    errorkey="NOASSIGNMENT"
#print "End Send Notification"

print "INCACTREASSIGN - END"