I'm trying to start using Materials Requisitions with a certain set of users, and I need them to ONLY requisition from one, particular, well-controlled storeroom.
For now. Sometime down the road, that may change, which is why I'm hesitant to just set the "Default Storeroom for Self-Service Requisitions" on their User profiles and move on. Here's a summary of what I've done so far:
I took CREATEDR.XML and for that Wizard part where you go through Step 1: Shipping and Charge Info, Step 2: MR Lines, Step 3: Review and Confirm -- in the XML that's all done with an include tag, and it's including something from LIBRARY.XML. I went to LIBRARY.XML, grabbed that whole wizard portion, and pasted it into CREATEDR.XML
twice, and changed the ControlID's in that second pasting so I could import it. With it imported, I can make further changes via Application Designer.
I set up and applied custom SigOptions so that if
this display the first "pasting" of the Wizard; otherwise, show the second "pasting". That's all working correctly.
The "if
this" is that I added a synonym value on the MRTYPE domain. Synonym is MYSYNONYM, and the base maxvalue behind-the-scenes is STANDARD.
At the top of the CREATEDR.XML I added radio buttons where the user can choose between basically STANDARD or MYSYNONYM.
I customize the second "pasting" -- removing a bunch of unnecessary fields, and --most importantly-- adding a Default Value control for the STORELOC attribute. On Insert, set the value to
MYSTORE.
So basically what should happen (and does happen) is if the user chooses STANDARD, they'd get the original OOTB Desktop Requisition experience. If they choose MYSYNONYM, they get a simplified experience where they have to fill out fewer fields, and they can only choose from Items in one particular storeroom.
Here's where I'm having a problem: I add an MRLine, and the STORELOC defaults to MYSTORE as I wanted. Then I go to enter an ItemNum. If I use the Lookup menu, it only shows the Items in that Storeroom. Excellent! But if I choose one from the Select Value menu, or if I had straight typed it in the field, when it validates it is clearing out the value of the Storeroom field. I presume that's because my User profile has no Default Storeroom. . .
I update my Default Storeroom to MYSTORE and try again. This time it works exactly how I wanted it to work. . .
I again update my Default Storeroom to OTHERSTORE and try again. This time, I enter the ItemNum and it sets the STORELOC to OTHERSTORE, and then I get an error in the ItemNum field because that Item isn't in OTHERSTORE's Inventory.
I even tried a simple script to (hopefully) force it to put MYSTORE back as the STORELOC value after Maximo does whatever it does to validate, but it didn't work. Here's the script:
from psdi.mbo import MboConstants
if mrType == 'MYSYNONYM':
mbo.setValue('storeloc', 'MYSTORE', MboConstants.NOACCESSCHECK)
This has an Attribute launchpoint on ITEMNUM, object is MRLINE, the mrType variable is bound to MR.TYPE, and the storeloc variable is bound to STORELOC. I've tried this with both the Validate and Run Action events.
Any ideas on how I can make this work? (Preferably without setting values in the Users' Default Storeroom)
#Administration#EndUser#EverythingMaximo#Inventory------------------------------
Travis Herron
Pensacola Christian College
------------------------------