During the design process, it is crucial for the engineer to access material information from the ERP system.
Using the “ERP Item” tab from this sample script, the designer can select an item in the Vault Client and view the material number and other relevant information live from the ERP system.
The event script is designed to be used with the sample ERP Plugin of powerGateServer:
A connection to the “MaterialService” is required. The Sample.ConnectToPowerGateServer script ensures that Vault is connected to the OData service before any operations are performed by this tab.
An entity set named “Materials” is expected as well as the entityset “MaterialDescriptions”
To provide additional information a pre-configured set of data for UnitOfMeasures and MaterialTypes are required. The Sample.SyncERPTabConfiguration script ensures that a default configuration is uploaded to Vault.
Vault items are uniquely assigned to an ERP item via their material number stored in the Vault property “Number” and the ERP field “Number”
The script can be tested by doing the following steps on your test-environment:
Install powerGateServer which comes by default with its sample ERP plugin and check that the service is running
Open the Vault Client and log in to your TestVault
Navigate to an item in the Item Master view and select it
Click on the tab with the name “ERP Item”
Since no item with the “Number” of the selected item exists in the ERP plugin of powerGateServer, a new one can be created.
To do this, select a ‘Type’ from the combobox and click on “Create Item in ERP”:
A new ERP Item has now been successfully created in the ERP system.
Its material number and other metadata are displayed:
Disabling the script
By default, the script enables the Vault “ERP Item” tab for items.
If you work exclusively with Vault files, or if you do not use this tab, the file %PROGRAMDATA%\coolOrange\powerEvents\Events\Sample.TransferERPItemViaItemTab.ps1 can be moved to the directory %PROGRAMDATA%\coolOrange\powerEvents\Events\Disabled.