Let PRL Help You (How I Could Have Been So Stupid Not To)
2013-4-18 15:03

More than six months now that NAV 2013 was sent out to the world. Over six months of gettting ready to program and sell this new gem in the NAV cosmos. Or even longer for those at MS and those that particapted in the TAP program. And still many of us even did not get in the right position for it, trying to find time to somehow get in the slip stream of this all.

For this very reason I was hired by a Dutch partner to conduct a What's New in NAV 2013 session for their developers. And PRL (Product Readiness Library) could have helped me a lot in this, but I was stupid not to let me be helped. Notwithstanding the very clear and enthusing blog post of waldo and the talk I had with MS PM Kurt Juvyns. Embarrassed

OK, in the end I managed quite well knowing my way around NAV resources for a long time already. Next to having been informed as MVP at various stages on the road to NAV 2013 RTM. But I could have really profited from PRL indeed as I experience now, allowing myself today to have a closer look at the PRL page on PartnerSource.

Don't be stupid as me to wait too long: go out there and inform yourself, be it only to experience this worthwhile library.

BTW: if you want a one-view listing of all material being presented on this page use the MegaMap.

Providing Companies to Write Their Own Help Using OneNote
2013-4-11 16:47

Prior to NAV 5.0 end-user companies could add their own notes and instructions to any help topic by means of the Company Notes feature. I recall I was happily using it when writing the Help for the Dutch localization as part of the 4.0 project back in 2004. If my memory doesn't fail there were some security issues around that led to the deprecation of it in NAV 5.0.

Now with NAV 2013 there finally is a successor to Company Notes: OneNote. Running NAV 2013 you probably have noticed the grayed out OneNote icon and like many didn't pay much more attention to it after that. But I think it's a cute successor to company notes or at least - but I actually should say more than - worthwhile to consider it the successor. Of course it does not integrate so nicely with the standard help system, but if gives you various other options that come with OneNote like DTP features and much more.

You can document your notes and instructions at page or at record level and store the OneNote notebook locally or on a share. You can associate separate notebooks with each (role center) profile thus differentiating instructions for the same page.

Details on how to enable OneNote has been described in various other post listed below, so no need for me to redo that job.

References

by Luc van Vugt | with no comments
Filed under: , ,
Real F1 Online Help for Your Add-On?
2013-4-11 12:22

Each time I am involved in some way with a Dynamics NAV partner with respect to Help for their add-on, inevitably the issue of wanting to have their help on-line pops up. There are many things to be said about this which I am not going to address in this post, but who knows later. Here I am picking out just one item:

How to activate (real) on-line help through the F1 key without too much fuss for both partner and end-user?

The F1 help, called context-sensitive help, is build into the NAV platform (client and application server). Once the user presses F1 the platform determines the context, i.e. the object help is wanted for, and links it through the master help project to the right help topic in the right help project. Details of this mechanism can be exposed using ShowHelpID as discussed in my previous post. Crucial to the connection between platform and help system is the .hh file as I explained in another post regarding help.

For each object for which F1 help is available, the .hh file holds one entry with the following format:

 <Event Source="addin_a.hhp">
    <ID>T_123456733_7</ID>
    <Master>master.chm</Master>
    <Subordinate>addin_a.chm</Subordinate>
    <Topic>html/T_123456733_7.htm</Topic>
    <Priority>5000</Priority>
    <Window>$global_Main</Window>
</Event>

The format above is using the example for field 7 in table 123456733 in help project addin_a.

By manipulating the value of <Topic> element we can let the help system act differently. For example we could change it to:

    <Topic>html/T_123456733_207.htm</Topic>

Pressing F1, while on field T_123456733_7, will now show the topic file T_123456733_207.htm (assuming it exists in the addin_a help project). In the same manner you could manipulate the <Subordinate> element so that it refers to another help project.

"Well, great, Luc," you might utter. "Where does this bring me in my want to activate real on-line help?"

Wouldn't it be great to feed the <Topic> element with an URL?

"Sure, and is this the holy grail for our issue?"

You really want to know? Sure?

... No, unfortunately. The system does not know what to do with the URL. Embarrassed

"So why the fuss?"

Well, this would have been the simplest answer to the question above. Therefor I have asked MS to consider to enhance the help system so that it can execute a URL provided in a <Topic> element.

If you also consider this a good enhancement join me and give your vote on ms connect. GO AND VOTE!

Thanx in advance. Yes

Ever used ShowHelpID? (or: How-to: Enable Help Debug Mode)
2013-4-7 15:37

Now that MS is enforcing CfMD on partners more and more, we all are faced with the requirement to build a help system, that goes with your add-on, more and more. Hence many of you have been working on creating a HTML help project (or even multiple) as described and supported by the Microsoft Dynamics NAV Help Toolkit.

Roughly we could divide a HTML help project into two parts:

  1. Object Reference Help (also called context-sensitive or F1 help)
  2. Non-Object Reference Help

One part that's mostly being triggered by the pressing F1 in the application and the other part that's referenced through hyperlinks in help topics, the table of contents, the index or search.

Once you have build your help project and deployed it, the ultimate questions will be: Does it work? Will the expected topic be triggered once you select one of your add-on fields and press F1?

Hopefully it does and that will be great. But what do you do when is does not show up? How do you find what's going wrong? For sure ShowHelpID will be very useful in your search. ShowHelpID? Yep, ShowHelpID. It has been there for ages already and can be applied to both classic and windows clients. All you need to do is create a shortcut of your NAV client and add a startup parameter.

windows client

-ShowHelpID

classic client

"ShowHelpID=1"

And what does this do?

When you run the client by means of the shortcut, the client will give information on what HTML topic it finds for the field that pressed F1 for.

windows client

Let's open the Customer Card, select Address field and press F1. This it what will be shown due to the ShowHelpID:

I reckon you smart enough to read what is exposed here. If you want get more details I would like to refer to the Help Debug Window topic in the help of the Microsoft Dynamics NAV Help Toolkit.

classic client

If we do the same in the classic client we will get:

OK! Click OK:

Somewhat different from what the windows client shows.

Note that the windows client only shows the end result, i.e. the help topic found that relates to the Address field, i.e. T_18_5.htm. Whereas the classic client shows also what it first tries to find, being the topic that relates to F_21_6, i.e. the control 6 on form 21, being the control that is bounded to the Address field. But as topic F_21_6.htm is not available in the help (first dialog), the help mechanism will try to find the help topic for the field itself, i.e. T_18_5.htm (second dialog).

Notes

  • Typically the classic client shows NAV searches for context-sensitive Help according to a fallback scheme. It's a pity that the windows client is not showing us this info.
    BTW: for Pages and report this fallback scheme looks like this (taken from the help of the Help Toolkit):

  • Did you notice that the windows client debug message says Language=nl-NL? Indeed I have been running NAV NL, but using ENU as application language and indeed the ENU help is shown. Strange that the dialog does not say en-US.
by Luc van Vugt | 2 comment(s)
Filed under: , ,
NAV 2013 - Debugger
2013-4-6 19:46

Not a very creative title, right? Indeed I am not the first one to blog about this. And surely I am not going to redo the great job my fellow MVP Daniel Rimmelzwaam has done month ago. If you haven't read his post yet, you have to go out and read it. Even more: watch his video embedded in the same post. Very instructive on the various aspects of the awesome debugger we have now for NAV. If you need reasons to get moving to NAV 2013 this one should be added to your list.

And BTW: also have a look at Marq's post.

Is that what I wanted to tell you, folks? Yes ... and no. To be honest: I just wanted to share the relief I felt when I started using this debugger. The shear fact that this debugger lets me break into any NAV process from different angles. For one perspective: have a look at Daniel's video on using the break button. Or for another perspective: have a look at the following.

Setting breakpoints in your C/SIDE object on the fly

In the pre NAV 2013 era a typical nuisance would be to debug a long running process. After you have started the process, you realize you have forgotten to set one or more breakpoints. But once the process has started, you have no way to get into the debugger. Now with NAV 2013, as said, you can simply push the break button, but you can also put breakpoints into your C/SIDE object on the fly.

Let's fake a long running process with the following codeunit (56789):

OnRun()

Window.OPEN('Indicator\@1@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@');
WHILE i < 10000 DO BEGIN
  Window.UPDATE(1,ROUND(i,1));
  i := i + 1;
  IF i = 8000 THEN
    ERROR('This is an error');
  SLEEP(5);
END

Let's run it:

Depending on the hardware you are running it on this takes some time (and if it's to fast rewrite set SLEEP to 10 or more).

OK, not to fast: don't forget to turn on the debugger (in the Development Environment choose Tools > Debugger > Debug Session to open the Session List, select your Windows Client Sessions and press the Debug button)

Now while the indicator progresses:

  1. Open codeunit 56789 in design mode
  2. Select the 3rd code line, i.e. Window.UPDATE(1,ROUND(i,1))
  3. Press F9 to set a breakpoint (i.e. the red bullet)
  4. See what happens. Almost instantly the debugger breaks at the 3rd code line.

 

by Luc van Vugt | with no comments
Filed under: ,
Workshop NAV Online Help for CfMD, March 25, 2013
2013-3-18 15:56

"It giet oan"  as the Friesians would say. Monday March 25, 2013 I will conduct a workshop NAV Online Help for CfMD in Veenendaal (NL). Still some places left. If you are interested feel free to contact me by mail at lvanvugt@fluxxus.nl.

TechDays 2013, The Hague (NL)
2013-3-10 12:45

With our full, newly formed development team we joined the first day of the TechDays 2013 in The Hague (NL). Consisting mainly of .NET developers there was an ocean of presentation to choose from. Being a NAV techy only this ocean was reduced to the size of at least the North Sea. Should I have mourned? Well actually not. Don't know about you, but I can handle only one presentation at a time. So more or less my program of that day was sort of set from the start.

  • Building Win8 apps? nope
  • Mobile matters? nope
  • ASP.NET? nope
  • .. etc. ...? nope
  • TFS? Ah, now you're talking

So what did I join:

  • Brian Keller - Application Lifecycle Management: It’s a Team Sport
  • Fokko Veegens - Customizing TFS 2012
  • René Van Osnabrugge - Team Foundation Server as perfect tool for SCRUM
  • Mads Kristensen - Beyond Visual Studio 2012: What’s Coming for Web Developers

Very useful to me! OK, the last one was somewhat out-of-scope for me, but nevertheless a bit useful now working with a gang of web developers. Brian, Fokko and René gave me quite to food for thought, next to some confirmations on what we are doing now with TFS 2012. So thanx guys!Beer

For those interested: find Fokko's and René''s slide decks here:

And what about Dynamics?

Well nothing different. Just like before. Nag, nag, nag, nag ... Super Angry

How-to: Deploy Your Help Project
2013-3-10 10:47

Typically an issue that keeps popping up every now and then on the NAV forums.

You have managed to learn to create Help for your add-on and compile your Help project to get the .chm and .hh files. Now you're ready to test it from the UI and have copied both files to the relevant directories. At least that's what you think - or should I say hope? Cool

So you start your Windows Client (RTC) and browse to one of your own pages - or maybe a standard page containing some of your add-on fields. You select the field and press F1, triggering the system to build the help index, opening the help window and ..., ouch, not displaying the help topic you are expecting it to do. Nevertheless checking the table of contents (TOC) confirms that your project is there, hence you wonder ...

Why is my topic not showing up?

In most cases the answer lies in the deployment of your help project. Two things are crucial here:

  1. installing the compiled project - i.e. your .chm file
  2. enabling the context-sensitive help - i.e. your .hh file

The recipe is simple (copied from the help of the Microsoft Dynamics NAV Help Toolkit):

  1. For each client installation, open the language-specific Help folder for the Microsoft Dynamics NAV Windows client. This is typically located at C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\en-US.
  2. Copy addin_a.chm to the en-US folder.
  3. Open the language-specific folder in the Service folder on the computer that is running Microsoft Dynamics NAV Server. This is typically located at C:\Program Files\Microsoft Dynamics NAV\70\Service\ENU.
  4. Copy addin_a.hh to the ENU folder.
  5. Restart the Microsoft Dynamics NAV Server service. Choose the Start button, and then choose Run.
  6. Type services.msc.
  7. Select the Microsoft Dynamics NAV Server service, and then choose Restart

[where addin_a.chm is typically your compiled help project. Note that there is some reasoning behind this naming addin_a which I will not discuss here).]

As your help project indeed is showing up in the TOC, the first part - installing the compiled project - isn't the problem. However the second often is. For this it's important to understand that the .hh file is the intermediate between the application structure and the help system. It contains a mapping between the application objects/fields/controls and there related help topics. The evaluation and execution of this mapping is processed by the application server (service tier), hence you have to make sure that the .hh file is stored on the machine where this service is running (see step 3) and that the service is restarted to get the .hh file included.

Notes

  • Ever used the debug mode of the help? See How to: Enable Help Debug Mode in the help of the Microsoft Dynamics NAV Help Toolkit
  • When using the debug mode you will notice that the help system is using some kind of fall-through mechanism which is described in the help of the Microsoft Dynamics NAV Help Toolkit (topic Context-Sensitive Help Lookup Process)
Call for Response on a Workshop NAV Online Help for CfMD
2013-3-2 11:43

Recently I have been contacted by a number of Dutch partners to help them out on the creation of Online Help for their add-on in the context of CfMD-ing the add-on. Having a longtime experience with Online Help and recently with CfMD I surely will pick up this request. But instead of doing this on a one-by-one basis, helping each partner individually, I have suggested them to combine forces and get together in a 1 or 2 days hands-on workshop, reducing their cost and at the mean time taking advantage of the presence of multiple people/partners, where each can learn from the other's specifics. If needed attention can also be giving to other (technical) aspects of the CfMD process.

Call for Response

So here I am to call upon any other Dynamics NAV partner in need of such a workshop to join in. If interested write a comment below or send me a mail at lvanvugt@fluxxus.nl.

Note ...

... that I can both target Dutch and partners from other countries. For sure I will be organizing a workshop in the Netherlands for Dutch partners, but also can do this for others. In the Netherlands or outside.

How-to: Reset Object Properties After Importing a UI Translation (NAV 2013)
2013-1-18 9:34

Recently I had to make sure that captions for both ENU and NLD were present throughout our solution. A job I have being doing many times over the past years and wrote some post about (you will find some here).

One of the last tasks in this process deals with resetting object properties after importing the UI translation back into our objects. To help you with this task the ObjectTime tool, a simple dataport, has been there for ages. But to my dismay MS has not made available a successor to that for NAV 2013. (Note that the MSDN article How to: Add Translated Strings By Importing and Exporting Multilanguage Files as such is incomplete as it does not tackle the issue of resetting object properties!)

So now we all are going to have to built this tool ourselves which isn't much of a deal, but it would have saved us all some time if would have been there where it used to be: in the UpgradeToolkit directory on the product DVD. As I have built it I just might share it with you. You can download it from here. O no, sorry, I cannot upload it to my blog site (some technical reasons I guess). I'll give you the text export here. Copy it and paste it into a .txt file and import that into NAV:

OBJECT XMLport 50000 Import/Export Object Time
{
  OBJECT-PROPERTIES
  {
    Date=18-01-13;
    Time=12:00:00;
    Version List=FLUX7.00.00;
  }
  PROPERTIES
  {
  }
  ELEMENTS
  {
    { [{2492F691-EBD4-4458-85FA-1BC05190649C}];  ;Root                ;Element ;Text     }
    { [{7DB14DEB-6C04-45DC-BC02-A64A6A35BBBD}];1 ;Object              ;Element ;Table   ;
                                                  SourceTable=Table2000000001;
                                                  SourceTableView=WHERE(Field1=FILTER(<>0));
                                                  AutoSave=No;
                                                  MinOccurs=Zero;
                                                  Import::OnBeforeInsertRecord=VAR
                                                                                 Object2@1000 : Record 2000000001;
                                                                               BEGIN
                                                                                 Object2 := Object;
                                                                                 IF Object2.FIND THEN BEGIN
                                                                                   Object2.Modified := Object.Modified;
                                                                                   Object2.Date := Object.Date;
                                                                                   Object2.Time := Object.Time;
                                                                                   Object2.MODIFY;
                                                                                 END;
                                                                               END;
                                                                                }
    { [{7ED90C76-8887-4264-810F-88E2814BB9DA}];2 ;Type                ;Attribute;Field  ;
                                                  DataType=Option;
                                                  SourceField=Object::Type }
    { [{F41BE766-5033-4069-9F81-E630067F2418}];2 ;ID                  ;Attribute;Field  ;
                                                  DataType=Integer;
                                                  SourceField=Object::ID }
    { [{5E744795-A0C7-4099-8C9E-1ED33F93061E}];2 ;Modified            ;Attribute;Field  ;
                                                  DataType=Boolean;
                                                  SourceField=Object::Modified }
    { [{21BC614A-AE81-4719-80A2-D3CCC94C9C1B}];2 ;Date                ;Attribute;Field  ;
                                                  DataType=Date;
                                                  SourceField=Object::Date }
    { [{C9B3B80F-2345-4AAA-ADC5-FF2B8785ED2C}];2 ;Time                ;Attribute;Field  ;
                                                  DataType=Time;
                                                  SourceField=Object::Time }
  }
  EVENTS
  {
  }
  REQUESTPAGE
  {
    PROPERTIES
    {
    }
    CONTROLS
    {
    }
  }
  CODE
  {
    BEGIN
    {
      +---------------------------------------------------------------------------------------------------------------------------+
      |Copyright (C) by fluxxus.nl. All rights reserved.                                                                          |
      +---------------------------------------------------------------------------------------------------------------------------+
      |Change | Date   |Developer |Bug Rep No.      |Description                                                         |Version |
      |-------+--------+----------+-----------------+--------------------------------------------------------------------+--------|
      |FLX0001|18-01-13|lvanvugt  |                 |Created object based on former MS dataport 104010                   |07.00.00|
      |       |        |          |                 |(Import/Export Object Time)                                         |        |
      |       |        |          |                 |Thanx to Marco de Vries (Imtech) and Gert Robyns (MSFT)             |        |
      +---------------------------------------------------------------------------------------------------------------------------+
    }
    END.
  }
}

Thanx to ...

... Marco de Vries (Imtech) & Gert Robyns (MSFT) as I bumped into (and let me not be stopped by) some stupidities. Beer

A blessed 2013
2013-1-3 9:34

To all of you!

Hope 2013 will be a fruitful year for us all. With NAV 2013; that will sure help! With my job at Imtech ICT that stopped on December 31st; room for new challenges! With our children growing up; we being spectator and participant at the same time of their personal quest of becoming a grown-up!

Amen - آمين - אמן -

by Luc van Vugt | 2 comment(s)
Filed under:
CODEUNIT.RUN - Conclusion
2012-12-9 14:29

Contrary to the other run-able CSIDE objects - i.e. Page, Report and XMLport - we can run a Codeunit and catch the result from this execution: TRUE or FALSE

Syntax:

[Ok :=] Codeunit.RUN(Number[, Record])

So if we call CODEUNIT.RUN and request a return value, as illustrated by the two first examples in this series - CODEUNIT.RUN #1 and CODEUNIT.RUN #2 -, this means that basically any runtime error emerging in the execution of the codeunit (as defined by the Number) will be caught by the system and will result in CODEUNIT.RUN to return FALSE.

Unfortunately there seems to be one exception to the rule - there the basically above - and this is illustrated by my third example, CODEUNIT.RUN #3, even though this example does not really deviate from my second example. The only difference being the table the double insert is operated on. CODEUNIT.RUN #2 operates on the Customer table and CODEUNIT.RUN #3 on the Shipment Method table.

Having in mind to write this short series on CODEUNIT.RUN I stumbled across this post of Bodo addressing this one anomaly - so these credits go to him. In short (as you might not be able to read German):

You will not be able to catch the execution result of a codeunit that makes a duplicate insert of a record as the system will already have thrown the error instead of passing a FALSE to my "catcher" statement.

The deviation that CODEUNIT.RUN #3 illustrates, seems to apply to all tables except for the Customer table. So only in case of the Customer table, it works like intended - did try it on quite some tables, but surely not all. With all other tables your catcher code will NOT get a FALSE passed. And this is clearly a bug as eYe also found out.

This anomaly has been reported to MS and if you feel like voting for it go here.

CODEUNIT.RUN #3
2012-11-18 8:36

All good things come in threes, as they say. So here is 3.

Codeunit 50000:
OnRun()
ShipMethod.INIT;
ShipMethod.INSERT;
ShipMethod.INSERT; // This duplicate statement has been put here intentionally

Codeunit 50001:
OnRun()
IF CODEUNIT.RUN(50000) THEN
  MESSAGE('OK')
ELSE
  MESSAGE('LASTERRORTEXT: %1', GETLASTERRORTEXT);

First "from the bare head", but test it in NAV! Both in classic and RTC. For the latter:

  • easiest: run codeunit 50001 from NAV 2013 DE
  • on NAV 2009: you have to create a page with an action that executes codeunit 50001

Note

Variable ShipMethod in codeunit 50000 is linked to the Shipment Method table (10).

ISV Insert Rights Available for NAV 2013 Licenses
2012-11-17 11:52

There has been quite some fuzz about the NAV 2013 partner licenses. Especially about the missing ISV Insert Rights. On one of my previous posts Gary Winter commented that this omission was "a bug in the licensing tool that does not allow partners to download a 2013 license with insert rights."

Since then I have been checking VOICE frequently to see if the bug was fixed already, but to no avail. Apparently I did not check for some weeks until today to find out that it has been fixed so that the ISV Insert Rights can now be configured for your partner license.

Related posts

Application Test Toolset for Microsoft Dynamics NAV 2013 - Available Now
2012-11-6 8:50

Just to spread the news I am copying Simon Ejsing's announcement on mibuso:

 

Post subject: Test Toolset for NAV 2013 - 9000 tests for free
New postPosted: Mon Nov 05, 2012 2:31 pm
Microsoft employee
As announced at Directions US 2012, Microsoft recently released the Application Test Toolset for Microsoft Dynamics NAV 2013 at PartnerSource.

The supplement is applicable to the following country releases of Microsoft Dynamics NAV 2013:
W1, AU, CA, DE, DK, ES, FR, GB, IN, IT, MX, NL, NZ, SE and US

The supplement contains the following per country:
  • Tools for managing and executing tests, capturing code coverage information, selecting relevant tests out of available tests
  • Between 7,000 – 9,000 real regression tests, giving a wide feature coverage across the application
  • Helper libraries for improving test development through reusing common functionality
  • Searchable documentation of helper libraries with examples of how to use library functionality

You can find the download here

Any feedback is highly appriciated and will help us focus our efforts better to support your needs!

More Posts Next page »