Showing posts with label communication templates. Show all posts
Showing posts with label communication templates. Show all posts

Saturday, 9 November 2019

Dynamically modifiy the body of Communication Template Jython | IBM Maximo

Recently we have a requirement to modify the content of communication templates based on the record; for instance, put all the lines of a PO into the communication template before sending an email.

Also, this technique can be used to send PO to the vendor by creating a new relationship to get the email id of the vendor from Companies.

1. Create an Object Launch Point automation script with SAVE - ADD - After Save events.
2. put this code as a script. it will call an existing template, modify and send it.

 
if (mbo.getString("STATUS") == "APPR"):
      # whereclause is a string with condition to select a comm.template
      whereclause = "TEMPLATEID ='PO-APPR-MGRR'"

      # Get the Communication template via Asset relationship to send email 
      # mbo is implicit asset object through which we get a template            
      ctMboSet = mbo.getMboSet("$commtemp","COMMTEMPLATE",whereclause);
      ctMboSet.setQbeExactMatch("true")
      ctMboSet.reset()
      ctMbo = ctMboSet.getMbo(0)
     
      corcount = mbo.getMboSet("POLINE").count()
      coractionset = mbo.getMboSet("POLINE")
      txtres = " "
         

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
 

Saturday, 27 January 2018

Open Specific Record Through URL Link In Email Using Relationship in Communication Template | IBM Maximo

There is user requirement of opening specific application record in maximo when users clicks the url link on email.

Let us take an example of email notification for condition monitoring app. We have communication template which is setup on MEASUREMENT object. But we want to open the specific record of condition monitoring app which has object MEASUREPOINT. We will use it using relationship substitution variable to get the unique id of application record (:MEASUREPOINT.measurepointid).

OBJECT: MEASUREMENT

RELATIONSHIP: MEASUREPOINT

UNIQUE ID: MEASUREPOINTID

SUBSTITUTION VARIABLE: :MEASUREPOINT.measurepointid

Tuesday, 18 October 2016

Send an email to the person in the reportedby field of a ticket? | IBM Maximo

 Is it possible to send an email to the person in the reportedby field of a ticket?

Answer

Steps:
1. Go to Roles application.
2. Create a new role called REPORTEDBY under Administration module > Workflow.

ref: http://www-01.ibm.com/support/docview.wss?uid=swg21497185