Topic
2 replies Latest Post - ‏2014-02-06T23:25:53Z by swkim90049
swkim90049
swkim90049
274 Posts
ACCEPTED ANSWER

Pinned topic PO - PO Lines - Charge To Storeroom Default if there is only one

‏2014-02-05T21:24:42Z |

Is there a way to make a default storeroom when the maximo item number is only in one storeroom?

  • swkim90049
    swkim90049
    274 Posts
    ACCEPTED ANSWER

    Re: PO - PO Lines - Charge To Storeroom Default if there is only one

    ‏2014-02-05T23:29:58Z  in response to swkim90049

    The below solution works... but get an error message whenever I pick a Maximo Item Number that belongs to more than one storeroom. Obviously, the cross domain is looking for one value, but it gets multiple and thus erroring out.

     

    1)  Go To - System Configuration - Platform Configuration - Domains - click Add New Domain - Add new CROSSOVER Domain - add the following:
     
    Domain: INVENTORY2POLINE
    Validation Where Clause: itemnum=:itemnum and itemsetid=:itemsetid and siteid=:tositeid
    Source: LOCATION
    Destination Field: STORELOC
     
    Save.
     
    2)  Go To - System Configuration - Platform Configuration - Database Configuration - access the POLINE object - click on the attributes tab - filter for ITEMNUM - add INVENTORY2POLINE to the Domain field.
     
    Save.
     
    Click on the List tab - click on Select Action - Manage Admin Mode - Turn On Admin Mode - click Ok - Click on Select Action - Apply Configuration Changes - Apply Changes - Turn Off Admin Mode.
    Updated on 2014-02-06T00:05:05Z at 2014-02-06T00:05:05Z by swkim90049
  • swkim90049
    swkim90049
    274 Posts
    ACCEPTED ANSWER

    Re: PO - PO Lines - Charge To Storeroom Default if there is only one

    ‏2014-02-06T23:25:53Z  in response to swkim90049

    If you instead want to use an Automation Script... this works better and doesn't give the error as the cross domain does:

     

    In regards to your issue, please do the following:
    
    1)  Go To - System Configuration - Platform Configuration - Automation Scripting - click on Select Action - Create - Script with Attribute Launch Point - enter the following information:
    
    Launch Point: ITEMNUM
    Object: POLINE
    Attribute: ITEMNUM
    
    Click on Next
    
    2)  Enter the following value:
    
    Script:  ITEMNUM
    
    Click on Next.
    
    3)  In the source Code Field, enter the following information:
    
    storeLocSet = mbo.getMboSet("$POLINE","INVENTORY","itemnum=:itemnum and siteid=:tositeid")
    inventoryLocation = storeLocSet.getMbo(0).getString("LOCATION")
    mbo.setValue("STORELOC",inventoryLocation)
    
    Save.
    
    Test issue