Automatically Send an email to the user when the material is received and inspected in Maximo.
- Automation script to send email
Object Launch Point: MATRECTRANS, Attribute: STATUS
from psdi.server import MXServer
if vISSUETYPE == 'RECEIPT' and vstatus == 'COMP':
# if not mbo.isNull("poline.mrnum"):
user = mbo.getUserInfo()
mboServer = mbo.getMboServer()
commTemplateSet = mboServer.getMboSet("COMMTEMPLATE", user)
commTemplateSet.setUserWhere("TEMPLATEID = 'RECEIVING' ")
commTemplate = commTemplateSet.getMbo(0)
commTemplate.sendMessage(mbo)
- Role, who will receive the email
Role: Receiving, Type: A Set of Data Related to the RecordObject: POValue: :POLINE.person.PRIMARYEMAIL
- Communication Template; email body
Template: ReceivingApplies To: POTo: RECEVINGIN (Role name created above)Send From: defaultSubject: Item:- :itemnum for PO:- :ponum has received.Body: Item:- :itemnum for Purchase Order:- :ponum has been received in storeroom.
No comments:
Post a Comment