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.

Send Email Notification- Service Request Activity Status to Completed

Service Request Activity Status to Completed

from psdi.mbo import SqlFormat

print "SRACTCOMP - BEGIN"

#Print "search for previous status history"
#print "Send Email Notification"

sqlf = SqlFormat("templateid='SRTASKCOMP' 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()

#print "End Send Notification"

print "SRACTCOMP - END"