Customer View

Simplifying Data Entry in Non-Merchandise Distribution Windows Using VBScripting

Posted by Eva Lau

May 1, 2014 6:42:00 PM

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.

cost-multiplier

non-merchandise-distribution

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.

non-merchandise-distribution-macro
 
The VBScript needs to fire OnPopulate on the NonmerchDistribution form.

vb-script-editor

First line is for the Reference field notation.  Second line is for the Supplier code.

reference-supplier

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.

support-zone-registration
SYSPRO7

Subscribe to Email Updates

Recent Posts

Module Spotlight

  • Inventory Forecasting

    Produce and measure automatic or manual forecasts.

  • Lot Traceability

    Track materials through receipt, manufacture, assembly, inspection, stocking and distribution.

Become a Customer Case Study

 

  • Raise your company's image
  • Promote your brand
  • Demonstrate your leadership

Learn More

From the Smarter ERP BLog