Skip main navigation (Press Enter).
Log in
Toggle navigation
Community
Topic Groups
Champions
Meet the Champions
Program overview
Rising Champions
IBM Champions group
User Groups
Find your User Group
Program overview
Events
TechXchange Conference
Community events
All IBM events
Participate
IBM Community Hub
Welcome Corner
Blogging Guidelines
Member directory
Community leaders
Resources
Badge Program
IBM Support Customer Day
Log in
Maximo
×
Maximo
Come for answers, stay for best practices. All we're missing is you.
Group Home
Threads
12.7K
Blogs
478
Upcoming Events
6
Library
858
Members
10.1K
View Only
Share
Share on LinkedIn
Share on X
Share on Facebook
Back to discussions
Expand all
|
Collapse all
sort by most recent
sort by thread
Integration - Problem with User Exit Autoscript adding a Labor record
Shannon Rotz
06/10/21 10:26 AM
In our system, time is reported in an external application and sent back to Maximo via interface table. ...
Shannon Rotz
06/10/21 01:42 PM
Update: solution posted on another group. It is: Use laborSet.setInsertOrg(orgID) before .add() ...
1.
Integration - Problem with User Exit Autoscript adding a Labor record
Like
Shannon Rotz
Posted 06/10/21 10:26 AM
Reply
Options Dropdown
In our system, time is reported in an external application and sent back to Maximo via interface table. If time is reported for a Labor Code that doesn't exist, there is a user exit autoscript that creates the Labor record on the fly.
This works fine with one organization, but we are in the process of adding a second organization. Maximo is trying to add all Labor records to the old organization even when the incoming transactions specify the new ORGID.
The code in the autoscript is:
irData.breakData()
struc_object = irData.getCurrentObject()
orgID = struc_object.getCurrentDataAsString("ORGID")
laborSet = MXServer.getMXServer().getMboSet("LABOR", MXServer.getMXServer().getUserInfo("MXINTADM"))
laborSet.setWhere("laborcode = '" + laborCode + "' and orgID = '" + orgID + "'")
laborCodeCount = laborSet.count()
if (laborCodeCount == 0):
integrationLogger.debug("Labor Code does not exist")
integrationLogger.debug("Creating Labor Record " + laborCode + " in Organization " + orgID + ".")
integrationLogger.debug("ORGID is " + orgID)
labor = laborSet.add()
labor.setValue("LABORCODE", laborCode)
labor.setValue("ORGID", orgID,MboConstants.NOACCESSCHECK)
laborSet.save()
integrationLogger.debug("Labor Code Created")
Can someone give me advice on how to ensure that the Labor record is added to the correct organization?
TIA
Shannon
------------------------------
Shannon Rotz
InComm Solutions
New Westminster BC
------------------------------
#Maximo
#AssetandFacilitiesManagement
2.
RE: Integration - Problem with User Exit Autoscript adding a Labor record
Like
Shannon Rotz
Posted 06/10/21 01:42 PM
Reply
Options Dropdown
Update: solution posted on another group. It is:
Use laborSet.setInsertOrg(orgID) before .add()
------------------------------
Shannon Rotz
InComm Solutions
New Westminster BC
------------------------------
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Related Content
Add Meter Reading via Autoscript
Shannon Rotz
Added 02/04/22
Discussion Thread
15
Enforcing Qualifications in Maximo
Steven Shull
Added 12/15/22
Blog Entry
Maximo Health Check Report
Shannon Rotz
Added 08/03/22
Discussion Thread
2
OOB workorder fields that are meant for customization? Attachments
Shannon Rotz
Added 09/18/21
Library Entry
Inbound Table Integration, Outbound Web Services
Shannon Rotz
Added 10/05/22
Discussion Thread
3
Copyright � 2026 IBM Community. All rights reserved.
Powered by Higher Logic