Maximo Open Forum

 View Only
Expand all | Collapse all

Create an action to auto-populate POline.Storeroom with Users Default Storeroom upon PO generation.

  • 1.  Create an action to auto-populate POline.Storeroom with Users Default Storeroom upon PO generation.

    Posted 08-05-2025 16:37

    This is what I've come up with, copying the formatting of other Set Value Actions, but as I feared it wouldn't be that easy.


    #MaximoApplicationSuite

    ------------------------------
    Nathan Frail
    FedEx
    ------------------------------


  • 2.  RE: Create an action to auto-populate POline.Storeroom with Users Default Storeroom upon PO generation.

    Posted 08-05-2025 17:47

    Actions are required to be invoked somehow, typically through an escalation or workflow.

    I would do this a different way. In this type of scenario, I assume you want to do this as a default for the user that they're allowed to change. The best way to do this is an Automation Script with the name POLINE.NEW . This name is important because it's a special type of automation script without a launch point that depends on the name matching.

    We also want to do a few other things to be safe here. An inventory reorder for example will set these fields and we don't want to cause errors during that process. Similarly, a PR being converted into a PO will set these fields. The automation script starts with some checks to ensure we're in the PO application and that it's an interactive session (not coming from an integration). If you have cloned PO or have an industry solution, you will need to update this check to account for those application(s).

    Below is an example script that should do what you want it to do. 

    # Update the app name below to the application name such as PLUSPPO
    # Checks that the session is interactive (not integration) since we do not want to default in that scenario
    if mbo.getThisMboSet().getParentApp()=="PO" and mbo.getUserInfo().isInteractive():
        userProfile=mbo.getProfile()
        # Confirms that the PO site matches the user default storeroom
        if userProfile.getDefaultStoreroomSite()==mbo.getString("SITEID"):
            mbo.setValue("STORELOC",userProfile.getDefaultStoreroom())



    ------------------------------
    Steven Shull
    Naviam
    ------------------------------