Maximo Open Forum

 View Only

 Get Shipmentnum for Outbound transaction

  • Customizations
  • Integrations
  • Inventory
KM Cornista's profile image
KM Cornista posted 09-15-2022 14:23
Good day everyone,

I am trying to get the Shipmentnum from an Inbound transaction of Inventory Usage. I tried getting it via automation script but it seems that it is returning null since it is not yet 'saved' when I am trying to get it from either preSaveRules or afterMboData. I need shipmentnum because it will be part of another requirement that is sending the shipmentnum to external. I created a custom object that saves invusenum and siteid and this is the object that will be used to send for the outbound. Any insights will be much appreciated.
Steven Shull's profile image
Steven Shull
Are you providing the shipmentnum or are you depending on it autonumbering in Maximo? If you're providing it in the request we can retrieve it pretty easily on any event. If you're depending on the autonumber, that occurs during the changeStatus which I believe is the last step in processing. According to our documentation (https://ibm-maximo-dev.github.io/maximo-autoscript-documentation/integration/osevents), it looks like if you had a changeStatus event for the script that would suppress the processing class's changeStatus. That's not something I'd typically recommend because you would need to make sure you keep this in sync with our logic.

Since you need to create a new record in a custom object to send outbound, is there a reason you can't utilize the SHIPMENT MBO on Add event for it? This would still fire for an integration based scenario and you'd be able to get anything from the inventory usage mbo (calling mbo.getOwner()) and of course anything on the the SHIPMENT from it.
KM Cornista's profile image
KM Cornista
Hi Steven,

I am depending it on the autonumbering from Maximo. I havent actually tried using the SHIPMENT Add event yet because I'm still trying to check if this can be done in the OSIN/PUBLISH scripts since I need to send the response back. Will try to utilize and test this scenario that you suggested, thank you!