In addition to the default fields available for tooltips, bar labels, and table texts, you can also include custom fields. These custom fields can be populated with data and used in tooltips, bar labels, and table texts as needed.
When you open the VPS, the relevant Dynamics 365 Business Central data tables - those containing the information required for visualization - are automatically copied one-to-one into the extension as so-called SIM (Simulation) data tables. These SIM tables serve as the working basis for the visualization in the VPS.
As a result, every scheduling action or modification you perform within the VPS affects only the simulation data. The original Business Central data remains unchanged until you explicitly press the "Save" button. Only then are the changes written back to the Business Central database.
Please note that you can also use data coming from "OnBeforeTransferEvents".
The following Dynamics 365 BC data tables are copied into the corresponding SIM data tables:
- Production Order => "NETVPS SIMPrdOrdr"
- Prod. Order Line => "NETVPS SIMPrdOrdrLn"
- Prod. Order Routing Line => "NETVPS SIMPrdOrdrRtngLn"
- Work Center Group => "NETVPS SIMWrkCntrGrp"
- Work Center => "NETVPS SIMWrkCntr"
- Machine Center => "NETVPS SIMMchnCntr"
If you want to display additional data fields in the tooltip, bar label, or table text within the VPS, you need to follow these steps:
-
Create a table extension to add the desired field to the relevant Dynamics 365 Business Central table.
tableextension 60001 POBCExt extends "Production Order"
{
fields
{
field(60000; "CustomField"; Code[20])
{
DataClassification = CustomerContent;
}
}
}
-
Create a corresponding table extension to include the same field in the VPS SIM (Simulation) data table. Please note that the data field numbers have to be identical.
tableextension 60000 POLExt extends "NETVPS SIMPrdOrdr"
{
fields
{
field(60000; "CustomField"; Code[20])
{
DataClassification = CustomerContent;
}
}
}
-
If necessary, create a page extension to populate the field with data, especially if the field is calculated or derived from other sources.
pageextension 60002 "ProdOrder" extends "Planned Production Order"
{
layout
{
addlast(General)
{
field("CustomField"; Rec.CustomField)
{
ApplicationArea = All;
}
}
}
How to proceed
Step 1
- Open Visual Studio Code and add a new project with a new al. file.
- Create the extension(s) you need as described above. Please note that the two data fields must have the same ID.
Step 2
The file app.json should contain the dependency for the VPS:
"dependencies": [
{
"appId": "5716C909-A743-461e-AC12-D99759152986",
"name": "Visual Production Scheduler",
"publisher": "NETRONIC Software GmbH",
"version": "x.x.x.x"
}
Step 3
Publish your extensions, and the newly added data field will be listed in the configuration for tooltip, label, or table text.
Result
If the field was generated by an "OnBeforeTransfer" event:
Comments
0 comments
Please sign in to leave a comment.