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 create a simulation in the VAPS, the relevant Dynamics 365 Business Central data tables -containing the necessary information for visualization - are automatically copied into the extension as so-called SIM (Simulation) data tables. These SIM tables serve as a working copy of the production data and are used exclusively within the VAPS for visualization and planning purposes. This setup ensures that any scheduling action or modification you perform in the VAPS affects only the simulation data. The original Business Central data remains unchanged until you actively press the "Save" button, at which point the changes are written back to the Business Central database.
The Dynamics 365 Business Central data tables that are copied into the SIM data tables include:
- Production Order =>"NETVAPS SIMPrdOrdr"
- Production Order Line => "NETVAPS SIMPrdOrdrLn"
- Production Order Routing Line => "NETVAPS SIMPrdOrdrRtngLn"
- Sales Order Number => "NETVAPS SIMSalesOrdrHeader"
- Sales Line Item Number = > "NETVAPS SIMSalesOrdrLine"
- Work Center Group => "NETVAPS SIMWrkCntrGrp"
- Work Center => "NETVAPS SIMWrkCntr"
- Machine Center =>"NETVAPS SIMMchnCntr"
If you want to display additional data fields in the tooltip, bar label, or table text within the VAPS, 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 VAPS SIM (Simulation) data table. Please note that the data field numbers have to be identical.
tableextension 60000 POLExt extends "NETVAPS 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 "Firm Planned Prod. Order"
{
layout
{
addlast(General)
{
field("CustomField"; "CustomField")
{
ApplicationArea = All;
}
}
}
This setup ensures that your custom field is available both in the source data and within the VAPS simulation environment, allowing it to be used in the visual scheduling interface.
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 VAPS:
"dependencies": [
{
"appId": "26fb6f9e-04f2-47c1-863e-9725fcdc9784",
"name": "Visual Advanced 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
Comments
0 comments
Please sign in to leave a comment.