When trying to enter the Item number on the various Purchase Order Lines, how can you set a default Storeroom value for that Item ?
Is there any workaround for that ?
There is a possible workaround to achieve this requirement without customisation, if you are using an Oracle Database.
1. Using a background script, create a view in the Database
CREATE VIEW INV_V
SELECT A.ITEMNUM,A.DESCRIPTION,A.COMMODITYGROUP , A.COMMODITY, B.LOCATION, B.SITEID FROM ITEM A, INVENTORY B WHERE A.ITEMNUM = B.ITEMNUM(+) ;
2. Go to the Database Configuration application.
- Create a new Object named "INV_V"
- The view information created in Step 1 will then be imported.
After turning the Admin Mode ON, do Select Action / Apply Database Configuration.
3. Turn the Admin Mode OFF
4. Go to the Domains application.
- Add a new CrossOver Domain
- enter values like below:
Domain Name : DFLTSTORE
Object : INV_V
Validation Where Clause : ITEMNUM = :itemnum AND ( LOCATION IS NULL OR SITEID = :Siteid) AND ROWNUM < 2
- In the Crossover Field section, add:
Source Field : Location
Destination Field : Storeloc
5. Go to the Database Configuration application
- Open the POLINE object
- Go to the Attributes Tab
- Find the ITEMNUM attribute : enter the Domain value that you created in Step 4.
- After turning the Admin Mode ON, run Select Action / Apply Database Configuration.
- You may need to restart the application server.
6. Now, when trying to input the Itemnum in the POLINE table, one of the storerooms for that Itemnum will be automatically selected from the INVENTORY table record.
N.B: Another option to achieve this requirement may be to customize the field class for POLINE.ITEMNUM.