IBM Maximo - How to add assignment to work order with automation script?

89 Views Asked by At

Using IBM Maximo 8, how would you add an assignment for the crewworkgroup HVAC via an automation script? What I am doing is creating a work order when an inspection is completed. I want to defualt all work orders to a certain crewworkgroup for this inspection.

 if mbo.getString("FUPOBJECT") == "":
                newSR = woSet.add()
                newSR.setValue("Description", "Inspection for " + str(mbo.getString("resultnum")))
                newSR.setValue("location", mbo.getString("location"))
                newSR.setValue("assetnum", mbo.getString("asset"))
                newSR.setValue("classstructureid", "CL104685")
                newSR.setValue("templateid", "TP100304")
                mbo.setValue("FUPOBJECT", "WORKORDER")
                mbo.setValue("FUPOBJECTID", newSR.getString("wonum"))
                mbo.setValue("DISPLAYMESSAGE", "Workorder " + str(newSR.getString("wonum")) + " created")
                print "Created WO " + str(newSR.getString("wonum"))
                woSet.save()
1

There are 1 best solutions below

0
On

Set this via a jobplan. Create a job plan that would have your crew work group in the planned labor section, and set the value in your script.