Topic
  • 5 replies
  • Latest Post - ‏2016-09-01T21:33:25Z by ShannonRotz
swkim90049
swkim90049
532 Posts

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
    532 Posts

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

    ‏2014-02-05T23:29:58Z  

    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
    532 Posts

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

    ‏2014-02-06T23:25:53Z  

    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
    
  • MTat
    MTat
    2 Posts

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

    ‏2016-08-31T19:03:33Z  

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

     

    <pre dir="ltr" style="color: rgb(0, 0, 0); word-wrap: break-word; white-space: pre-wrap;">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 </pre>

    Swkim90049,

     

    This works great. I also need to set the GL Debit Account no. I added the below line but it doesn't work at all. Any idea?

     

    mbo.setValue("GLDEBITACCT",'1924920-000')
    
  • MTat
    MTat
    2 Posts

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

    ‏2016-08-31T19:23:34Z  
    • MTat
    • ‏2016-08-31T19:03:33Z

    Swkim90049,

     

    This works great. I also need to set the GL Debit Account no. I added the below line but it doesn't work at all. Any idea?

     

    <pre dir="ltr" style="color: rgb(0, 0, 0); word-wrap: break-word; white-space: pre-wrap; background-color: rgb(238, 238, 238);">mbo.setValue("GLDEBITACCT",'1924920-000') </pre>

    if I change the order in which i set the storeroom and gldebitacct then the last one works.

  • ShannonRotz
    ShannonRotz
    65 Posts

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

    ‏2016-09-01T21:33:25Z  

    Not sure why you'd want to set the GL Debit Account.  If the storeroom is populated (POLINE.STORELOC), then it's supposed to come automatically from the Storeroom record (Go To --> Inventory --> Storerooms), retrieve the storeroom record, make sure the Control Account value is populated.

     

    See the Financial Reference Guide for more information.