Timeline Business Data Visualization in Inventory Projection for DynamicsNAV 2009 R2
Just have released a new improved release of the Timeline visualization for DynamicsNAV 2009 R2
on Partner Source and Customer Source!
It is already a while ago since Microsoft DynamicsNAV R2 has shipped. On the DVD image there two Business Data Visualizations shipping: The Treemap visualization and this now updated Timeline visualization. The latter can be used for example to visualize the projected inventory of an item over time.
This visualizations shows the inventory level for one item / variant over time and lets the user compare scenarios of the core transactions only, taking into account forecast and changes suggested by the planning engine (“Action messages”) or the planner himself. The user can edit in the latter scenario and apply his own changes to supply transactions interactively in the chart: He drags data points to change supply quantity or moves them in time to suggest a rescheduling action.
Changes are transmitted back to app code and can be processed, validated and applied or rejected.
Further interactivity options cover zooming, scrolling, creation & deletion of supply, reverting of supply changes and automating adjustment for individual supply to balance the inventory until the next planned supply.
What is new in this update:
The Add-in API
In earlier releases this visualization was communicating over XML ports with the business logic to get and modify the transactions and the rows in the planning journal. This communication has been replaced with a more robust .Net interop object, which the visualization provides to the business logic. This removes certain encoding problems that might have been observed before. This object is actually great to walk through the features of the visualization Add-in:
It is the TransactionDataDocument which is exposed by the Add-in assembly itself: Microsoft.Dynamics.Visualizations.InteractiveTimeline.AddIn.TransactionDataDocument.
An instance of this document class is instantiated, populated and serialized by the business logic, in order to compose the data document that the visualization Add-In need to receive over the data binding of the respective field’s source expression .
Add-in API: Properties
If we look at the Interface find the following properties that C/AL business logic may set:
ItemName | Name of the Item in the above example: “Bicycle” |
LegendSeriesTitle1..3 | Label of the three scenario checkboxes |
MinAutoAdjustLevel | The minimum level which the ”Auto Adjust” tool takes into account |
SpecialDates | Table of dates which are highlighted and labeled in the background of the visualization |
SpecialValues | Table of constant values which are drawn as colored horizontal lines with label attached |
Title | Text label in front of the Item name, e.g.: “Projected Inventory” |
Transactions | List of transaction of different type, amounts , dates, description and other attributes. |
TransactionPrecision | Precision of the measure / Y-Axis, e.g. 2 for rendering of “1.123,45 kg” |
TransactionSupport | Value that indicate which of the three scenarios to show CoreTransactions = 1 CoreTransactionsWithForecast = 2 CoreTransactionsWithForecastAndAdjustments = 4 |
TransactionUnitOfMeasure | The unit of measure that is rendered with the transaction amount, e.g. “kg”. |
Uniqueness | Value set by business logic to indicate that a new document has been set, even if it contains the same content. |
Add-in API: Methods
And we have the following methods for the application developer:
AddSpecialValue (decimal value, string title, Color color):
Adds a constant value which is drawn as colored horizontal lines with label attached.
AddSpecialDate (DateTime date, string title)
Adds a date which is highlighted and labeled in the background of the visualization.
Serialize()
Serializes the document into XML, which will be used to fill the document variable for databinding.
Add-in API: Triggers
The visualization sends also the following OnControlAddIn trigger events to the business logic :
DataChanged = 100 | The data parameter is a xml serialized TransactionChangesDataDocument that contains all transaction modifications, since before planning. |
SelectedPointChanged = 101 | When a transaction point has been selected. The data parameter references the transaction. |
DataPointActivated = 102 | When a transaction point has been activated (Enter, double click). The data parameter references the transaction. |
CommandProcessingComplete = 999 | Sent whenever a command document has been processed, such that business logic may reset the document data to prevent multiple execution. |
Add-in API: Xml commands
The visualization supports the following XML commands which can be sent through data binding. The purpose of these command is to give the business application developer similar modification control like the end user has. This comes handy for example, when the user can alternatively edit transaction changes in a list, and the business application developer wants to synchronize the visualization without sending over a complete transaction document.
Clear = @"clear" | Command that tells the visualization to clear all data. No parameter used. |
Delete = @"delete" | Command that tells the visualization to delete a data point. Parameter: RefNo of the data point. |
Reschedule = @"reschedule" | Command that tells the visualization to reschedule a data point. Parameter: RefNo of the data point. Parameter: New date. |
RevertChanges = @"revertchanges” | Command that tells the visualization to reschedule a data point. Parameter: RefNo of the data point. Parameter: New date. |
ChangeQuantity = @"changequantity" | Command that tells the visualization to change a data point's amount. Parameter: RefNo of the data point. Parameter: New amount. |
SetCurrent = @"setcurrent" | Command that tells the visualization to set the Current data point. Parameter: RefNo of the data point. |
If you want to find a good example on how this API can be used from business application code, I suggest you study the application objects that come with the Add-In. They implement the visualization in and End 2 End scenario for Projected Item Availability monitoring.
Important: You need to install one of the recent hofixes for DynamicsNAV 2009 R2 / SP1, in order to get the integration code working. Some updates to the .NET interop from the Hotfix builds is required. (The necessary hotfix has been applied in KB 2492239, which was released in March 2011 and comes with the NAV build number: 6.0.32146.)
Christian Abeln
Senior Program Manager
Microsoft Dynamics NAV
Comments
- Anonymous
June 08, 2011
Hi Christian - do you know which hotfix is required for this to work?Thanks - Anonymous
June 08, 2011
Hi Paul,The necessary hotfix has been applied in KB 2492239, which was released in March 2011 and comes with the NAV build number: 6.0.32146.(will update the post)Best, Christan - Anonymous
February 15, 2013
Would it be possible to show this timeline based on inventory in another company?For companies with sales offices (no stock) it would be great to see the inventory at the "logistical" company.