Sunday 15 June 2014

Maximo - Adding elements to a CustomMboSet using scripting -



Maximo - Adding elements to a CustomMboSet using scripting -

is possible add together custommboset in maximo using scripting? writing custom application using custom object called timesheet. part of application writing (jython) script needs dynamically build mboset (a set of timesheets). code retrieves existing custommboset , attempts add together elements it. works when using out of box mboset, when seek run same code on custom mboset not seem work. no error thrown, code below offending line not run.

in other words, works (labtrans out of box mbo):

mymboset = mbo.getmboset("labtrans") newmbo = mymboset.add() # set attributes on newmbo, happy

but not (timesheet custom mbo):

mymboset = mbo.getmboset("timesheet") newmbo = mymboset.add() # code not execute after above line

anyone have insight why seeing behavior? maximo scripting framework not back upwards dynamic building of custommbosets? help appreciated. thanks.

you need create sure relationship exists between current mbo , custom mbo in database configuration otherwise not work.

alternatively can utilize next code create new mboset on fly:

timesheetmboset = mxserver.getmboset("timesheet", userinfo)

scripting maximo

No comments:

Post a Comment