When posting Purchase Order Receipts for stock codes with a cost multiplier, SYSPRO always prompts operator for Non-Merchandise Distribution information.
In this case, the user ends up repeatedly typing in the same information over and over.
Here is a way to bypass this window and set defaults on this screen so that users do not need to manually type in the Reference and Supplier each time.
Workaround:
We are going to use VBScript to auto-populate the Reference and Supplier fields with pre-defined values so operators do not have to manually key in information each time.
To define VBScript, right-click on the column header in Non-Merchandise Distribution screen.
Then select Customize > Macro for: PORPRSLD.
The VBScript needs to fire OnPopulate on the NonmerchDistribution form.
First line is for the Reference field notation. Second line is for the Supplier code.
The VBScript should autopopulate with the above code.
We also manually added extra VBScript commented out in green in above screenshot and repeated below. This part of the script passes the keyboard short-cut (Alt+S) for the ‘Save and Close’ button.
'dim objShell
'set objShell = createObject("wscript.shell")
'objShell.sendKeys("wscript.shell")
This code will automatically Save & Close the Non-Merchandise Distribution screen and NOT allow operators any opportunity to review or edit information entered. So take care before adding this part of the VBScript.