Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Access to status memo in attribute launch point script

    Posted Wed May 13, 2020 04:59 PM
    I'm working on an attribute launch point that will trigger a communication template when a Service Request status changes. The script runs as desired, but the substitution variable :tkstatus.memo is not being expanded in the resulting email. The other values appear and the variable syntax seems correct because the memo is expanded when using Create - Communication with the same template. The only google reference I could find to the question basically said "yep, that's a problem all right" from five years ago.

    Has anyone successfully done this? Thanks.

    Here's the text of the communication template:
    The service request number :ticketid ":description" has been changed to :status with the comment ":tkstatus.memo"
    To visit the service request and learn more, click this link: <http://:hostname/maximo/ui/maximo.jsp?event=loadapp&value=VIEWSR&changetab=main&additionalevent=sqlwhere&additionaleventvalue=ticketid=':ticketid'>

    And the script. The launch point is on the Validate event.
    load("nashorn:mozilla_compat.js");
    importPackage(Packages.psdi.mbo);
    importPackage(Packages.psdi.server);
    importPackage(Packages.psdi.util);

    if (mbo.isModified("status") && srStatus!="CLOSED") {
    var comTmpltSet=MXServer.getMXServer().getMboSet("COMMTEMPLATE", MXServer.getMXServer().getSystemUserInfo());
    comTmpltSet.setWhere("templateid='SRSTATUS'");
    comTmpltSet.reset();
    comTmpltSet.getMbo(0).sendMessage(mbo,mbo);
    }


    ------------------------------
    Robert Goff
    ------------------------------



    #AssetandFacilitiesManagement
    #MaximoIntegrationandScripting
    #Maximo


  • 2.  RE: Access to status memo in attribute launch point script

    Posted Wed May 13, 2020 05:58 PM
    I may have answered my own question. I deactivated the attribute launch point and added an object launch point on the save event. Now I'm getting the memo expanded in the template as desired.

    ------------------------------
    Robert Goff
    ------------------------------