Hello all,
I am trying to create automation script in Maximo 7.6.1.3 in custom application where main object is SR (app its created from original application VIEWSR) button when user click on it to create new SR so new TICKET and if is possible to even open this new ticket directly then in other application where main object is also SR. Maybe anybody know how to achieve that? I am trying for a start to create a TICKET from here and I get error "BMXAA4195E - A value is required for the Ticket field on the TICKET object." I tried something like that:
from psdi.mbo import MboConstants
from psdi.mbo import MboRemote
# Create a new Ticket with a relationship to MXZTICKET
ticketSet = mbo.getMboSet("MXZTICKET")
newTicket = ticketSet.add()
# Set mandatory fields for the Ticket object
##newTicket.setValue("TICKETID", str(ticketSet.getMbo(0).getUniqueIDValue()))
newTicket.setValue("DESCRIPTION", "TEST dogodka")
newTicket.setValue("CLASS", "SR")
newTicket.setValue("STATUS", "NEW", MboConstants.NOACCESSCHECK)
# Set other attributes as needed
# Save the new Ticket
ticketSet.save()
# Get the ID of the newly created Ticket
newTicketId = newTicket.getInt("TICKETUID")
Best regards
#ServiceProvider
------------------------------
Blaz Rakar
Slovenske Zeleznice d.o.o.
------------------------------