Hey @Julio Roca i have tried the script and it works fine.
from psdi.server import MXServer
if mboname=='WORKORDER' and app=='WOTRACK' and mbo.getString('SITEID')=='BEDFORD':
mbo.setValue('DESCRIPTION','script triggered WOTRACK.new')
mbo.changeStatus("INPRG", MXServer.getMXServer().getDate(), "Status Changed from .NEW Script")
mbo.setValue('GLACCOUNT','6000-200-000')
wostatus=mbo.getMboSet('WOSTATUS')

------------------------------
Vivek Nagre
JLL
------------------------------
Original Message:
Sent: 10-20-2023 02:13
From: Julio Roca
Subject: Maximo Script - WORKORDER.NEW
Hello Steven,
Your explanation is right on target and now this works like a charm!
Thank you so much for your help!
JR
------------------------------
Julio Roca
BCBS
------------------------------
Original Message:
Sent: 10-19-2023 13:22
From: Steven Shull
Subject: Maximo Script - WORKORDER.NEW
When you're creating a work order, you normally will not have an owner. Think of the owner in the context of something like PR->PRLINE. If you had a script on PRLINE.NEW, then the PRLINE owner would be the PR header. You may be creating a WO specially where it does have a parent, but the second line there "workorder = mbo.getOwner()" is likely going to be null. You normally would just be using mbo. IE:
if mbo and mbo.isBasedOn("WORKORDER"):
------------------------------
Steven Shull
IBM