All around NAV dev and test
One of the major additions to NAV 2016 is Workflow. Both technical and functional more than interesting to take a deep-dive in as me and my friend Arend-Jan Kauffmann did to prepare a What's New in 2016 workshop. It makes use of the new platform feature Eventing (technical) and has been applied to replace the Document Approval feature (functional).
If you haven't been on this subject yet, come and visit or book our workshops or inform yourself using the various resources that have been popping up since October, like for example:
Or the various documents on the Microsoft Dynamics Learning Portal.
But as with many new things not all parts of the story are being told. The various resources will help you to create new workflows (functionally) and how to add new workflow events and responses (technically), but do not tell, for example, anything about creating new workflow templates. Clearly, with CRONUS we get a number of readily setup templates, but how do you create a new template? How to accomplish this (1) manually or (2) by code as part of your add-on?
Basically there is not much of a difference between a workflow template or a regular workflow as both types are stored in the same table (1501). The sole discriminating factor is the Template field. Turning it on changes a regular workflow into a workflow template, and vice versa. But ... there is no way of getting this done through the user interface. No page to create, open and modified a workflow template. No page that allows to check mark the Template field. Check out the Workflow Templates page.
You can view a template or create a new workflow based on an existing template. But ... no way to create a new template.
So we have a new workflow on the verge of being transformed to a template which we do by running the workflow table (1501) from the Development Environment.
Tip: make sure that the Description field also has a meaningful value as this is used to list a workflow template.
Workflow templates are created through codeunit 2 (Company-Initialize) calling the function InitWorkflow in codeunit 1502 (Workflow Setup):
InitWorkflow in turn calls the local function InsertWorkflowTemplates, where I would typically hook in for my own workflow template:
Enough example functions available to write my own InsertMyWorkflowTemplate function.
Do I need to write my code here? What about that other nice new feature Eventing, I mentioned above? Is there now Integration Event available in the InsertMyWorkflowTemplate function that I can subscribe to?
I mean, it has been provided in codeunit 1520 (Workflow Event Handling) and 1521 (Workflow Response Handling) to allow me, without any footprint in these 2 codeunits, to write my own codeunits to create new workflow events and responses. Hasn't this been done for workflow templates? Nope, I am sorry.
So I will need to put code in codeunit 1502 to get this done. Yep, no way around it for now.
But ... I have asked MS to create an integration event OnInsertWorkflowTemplates in codeunit 1502 for this very reason. Wanna be help on this? Go there and give your vote. Thanx!
For about 2 years I have been using Statical Prism on and off, depending on the type of project I am working on, as in some cases I have the availability over IDYN's Object Manager (OMA). With NAV 2016 and a license update Statical Prism is in focus again.
For those who do not know Statical Prism (yet) ... shame on you ... I mean ... it's a simple and efficient where used tool. Or as Vjeko puts it: "... it’s a tool that reads your text object file, and then allows you to analyze the objects and the code, and to find object usages (where used)".
No big installations, no additional big data repositories needed if you, for example, are, like me, already making use of a source code management system like Team Foundation or GIT with local workspaces.
The interface is simple and in general very intuitive, nevertheless, there are always features that are somewhat obscured by other possibilities or, as often, by the restricted view of the user (yes, moi).
This week, triggered by some feedback I gave on the tool, I learned a very nice feature regarding TRANSFERFIELDS. Right clicking on any TRANSFERFIELDS statement will allow you to select Show inter-table field mappings ...
...which will give an overview of what fields will be copied from the one table (left) to the other (right).
Wow, simple, but very useful. Great, guys.
BTW: clicking on many other code parts like system functions, variables or parameters, leads you to more background info, either within Statical Prism or outside on msdn.
Not sure if this tool will make sense to you? Download the Community Edition from mibuso.com and play with it.
Even though today's, Dutch climate seems to say something totally different, Christmas is on the verge. School vacation has started and so has mine. We would be traveling to the French Alps for a week of skiing. Too little snow keeps us home, unfortunately. But as our famous soccer philosopher, Johan Cruyff, says: every disadvantage has its advantage. Like time enough to pick up blogging again. Just now I published my pledge to Mr. Microsoft. Hope to see your votes on msconnect. And even though I don't want My Documentation Trigger to be an Xmas Tree, every disadvantage has its advantage.
So let my take this opportunity to send you virtually Xmas card created in NAV 2016 wishing all my readers a ...
Feel like playing around with this object? Download it here.
I believe many of us were positively surprised by the new C/AL Editor in NAV 2016. At the various conferences last fall it got the applause it deserved, even though it has some hiccups. Like not being able to use the Symbol Menu to paste functions, variables, etc.
One of the minor new cute things is the coloring of Date, Time and numerical constants:
I must admit the fuchsia coloring of numericals is somewhat awkward, but surely it discriminates very well and I promise I will not mention, or even complain about, it again after today. Not in the least. There are better things to complain about, like the topic of today's post. You might fully disagree with me on this (and please share this below as a comment), but I clearly don't want my documentation trigger to be like an Xmas tree, Mr. Microsoft. Watch this ...
Ouch, that hurts my eyes. I get totally lost. Am I looking at code or am I looking at documentation? We haven't upgraded yet to NAV 2016, but I fear the moment we will have and I will open one of our objects facing the documentation trigger. Why wait? Let's give it a try.
Nope, I am still not a fan, Mr. Microsoft. So my ...
... is to disable coloring in the documentation trigger. For this I have reported this issue on msconnect. Click here and give your vote, in favor or not.
If you haven't seen the editor yet (hard to imagine, isn't it?) or haven't found many of it's nice feature, have a look at this elaborative post by Olof Simren.