Rashed Amini

The ara3n weblog

Dynamics NAV 2009 Sp1 Client Add-ins

9th November 2009

When Service Pack 1 was released for Dynamics NAV, it introduced a new feature: Add-ins. I had read the walk-through and was thinking of something useful to build that would utilize the Add-ins feature. Last week a salesperson emailed me and asked me if anybody had migrated the Graphical Process Flow Chart Tool that Microsoft had released. Here is the URL.

I imported the fob and loaded the objects into a 5.0 database and looked at how the demo was built. The Visio diagrams are saved as pictures and a form with Visio picture at the back and NAV buttons displayed on the form.
Here is a screen shot. The background window show the form when you run it, and the front window is the form in design form. It’s a very simple demo.
Screenshot

I created a new visual studio class project following the walk-through in the following link. It was useful in getting me started with building a working Add-in that rendered a text box.
There are many solutions on how to render the Visio diagram in Role Tailed client. I tried to use the Visio control but couldn’t get it to work. I saw in the Demo VPC the Visio diagram, and it would be nice if they blog about it. The other solution is to save the visio as html file and render it in a browser. For demo purposes I thought staying with bitmap solution would be sufficient, so I decided to stay with the Bitmap solution.
I created a PictureBox control and display a blank image on opening of the page. After the Page is opened, I saved the image on the RTC temp directory and send the Image location to the add-in be loaded on the Page. My demo solution is implemented in the following steps: Display an Empty PictureBox. Load the Image from a blob field from NAV. Handle and send mouse event coordinates to NAV. Handle mouse click event and send it to NAV. Communication from C/AL is done through modifying the SourceExp assignment which calls Value Set function. The Add-in is used 3 times to load 3 different images on same page, and user can click on any areas and specific Dynamics NAV page will load.
For example; if they click on Purchaser icon, it will open The Salesperson/Purchase Card.
Here is a screen shot of the results. While moving the mouse over boxes, the mouse icon changes to a hand letting the user know that it’s click-able.

Screenshot

The handling of Coordinates and business logic are done in NAV. In My example I’ve hardcoded the locations in code, but could be moved to a setup table and made more dynamic so that you could build a variety of solutions. For example build a touch button calculator.

Screenshot

Or display a restaurant diagram that the user can click on and open the specific table. Or have a warehouse Image that loads the specific bin.
The mouse position/ coordinates are sent to NAV, thus you can have a setup table to do specific tasks based on the coordinates.

Screenshot

I’ve attached the demo.zip file that you can download and use it for demos or for future solutions.
I’ve also attached the Visual Studio Project with source code.

4 Responses to “Dynamics NAV 2009 Sp1 Client Add-ins”

  1. Roberto Ruiz Says:

    Congratulations about your post.
    It’s fantastic!
    Do you know some others add-in examples of this style?
    Thanks in advance,

    Roberto Ruiz

  2. ara3n Says:

    you can read Freddy blogs.

    http://blogs.msdn.com/freddyk/archive/2009/11/01/using-touchscreens-with-the-roletailored-client.aspx

  3. oscar Says:

    Hi Rashed,

    Thanks a lot for this post! I was on my way to install it and fiddle around with it but I found out that the zip files are corrupted… Do you think you can repost them again, pleeeeease?

    regards and thanks again for this post!

    Oscar

  4. ara3n Says:

    I just re-downloaded them again and the zip files are fine. Try to re-download them. I’ve also emailed them to you.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word