Wednesday 13 February 2019

Notify requester of MR when Material is received | Maximo

Automatically Send an email to the user when the material is received and inspected in Maximo.


  1. 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)

  1. Role, who will receive the email
Role: Receiving,  Type: A Set of Data Related to the Record
Object: PO 
Value: :POLINE.person.PRIMARYEMAIL
 


  1. Communication Template; email body
Template: Receiving
Applies To: PO
To: RECEVINGIN (Role name created above)
Send From: default
Subject: Item:- :itemnum for PO:- :ponum has received.
Body: Item:- :itemnum for Purchase Order:- :ponum has been received in storeroom.

No comments:

Post a Comment