Maximo

Maximo

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

 View Only

Create Workorder From SRs Using Escalation

  • 1.  Create Workorder From SRs Using Escalation

    Posted 12 hours ago

    Hello Everyone, now i am trying to create workorder for each SR with status NEW but i want to make this process through Automation Script because i want to copy some specific fields from the sr to the created workorder.

    I have tried the following:

    1. first method: i have created the escalation with condition status = 'NEW'
    2. Empty condition Escalation Point
    3. action group which have:
      1. Applicaiton Action Create WO
      2. Script that copy my desired fields, change current sr status to inprogress and apply sla on the workorder

    the escalation is running and only the first action is seems done but the script is not running or running without making what i am waiting for.

    i have attached the script.

    the used relation in the script is from SR to Workorder ==> status = 'NEW' 
    AND origrecordclass = 'SR' 
    AND origrecordid = :ticketid 
    AND createdate = (
        SELECT MAX(createdate) 
        FROM workorder 
        WHERE origrecordclass = 'SR' 
          AND origrecordid = :ticketid 
          AND status = 'NEW'
    )
    -----------------------------------------------------------------------------------------------
    Also i have tried to create the workorder from scratch using an script without using the application action and then copy the desired attributes and then appling the SLA on the created workorder by invoking workflow from the script that has apply SLA application action.
    I have attached the script .
    ----------------------------------------------------------------------------------------------
    Both ways are not working i need to know why.



    ------------------------------
    Abdullah Blal
    Software Engineer
    Megasoft
    Giza
    +201155119254
    ------------------------------

    Attachment(s)