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 VJS, 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 VJS.
As a result, every scheduling action or modification you perform within the VJS 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:
- Jobs => "NETVJS SIMJob"
- Job Planning Lines => "NETVJS SIMJobPlanningLine"
- Job Tasks => "NETVJS SIMJobTask"
If you want to display additional data fields in the tooltip, bar label, or table text within the VJS, 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 JobBCExt extends Job
{
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 JobExt extends "NETVJS SIMJob"
{
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 "Job" extends "Job Card"
{
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 VJS:
"dependencies": [
{
"appId": "9a08bc1f-7ac9-4671-b212-9076b2869e80",
"name": "Visual Jobs 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.