Rash thoughts about .NET, C#, F# and Dynamics NAV.

"Every solution will only lead to new problems."

Sunday, 6. January 2013

Bug in Microsoft Dynamics NAV 2013 OData services?!

Filed under: C#,Dynamics NAV 2013,Navision,Visual Studio — Steffen Forkmann at 10:24 Uhr

The “Walkthrough: Creating and Interacting with a Page Web Service (OData)” shows how we can easily access Dynamics NAV OData from the default company:

But somewhere in this process there seems to be a bug. If I want to access data from a different company I get a timeout:

I found a workaround for this, but if anybody knows more about this please write a comment.

Tags: , ,

Friday, 4. January 2013

F# and Microsoft Dynamics NAV 2013 OData Services

Filed under: C#,Diverses,Dynamics NAV 2009,Dynamics NAV 2013,F#,Visual Studio — Steffen Forkmann at 13:52 Uhr

In my last post I described how we can access Dynamics NAV 2009 SOAP web services from F# and the benefits we get by using a type provder. Since version 2013 it’s also possible to expose NAV pages via OData. In this article I will show you how the OData type provider which is part of F# 3 can help you to easily access this data.

Exposing the data

First of all follow this walkthrough and expose the Customer Page from Microsoft Dynamics NAV 2013 as an OData feed.

Show the available companies

Let’s try to connect to the OData feed and list all available companies. Therefore we create a new F# console project (.NET 4.0) in Visual Studio 2012 and add references to FSharp.Data.TypeProviders and System.Data.Services.Client. With the following snippet we can access and print the company names:

As you can see we don’t need to use the “Add Service Reference” dialog. All service type are generated on the fly.

Access data within a company

Unfortunately Dynamics NAV 2013 seems to have a bug in the generated metadata. In order to access data within a company we need to apply a small trick. In the following sample we create a modified data context which points directly to a company:

Now we can start to access the data:

As you can see this approach is very easy and avoids the problem with the manual code generation. If you expose more pages then they are instantly available in your code.

As with the Wsdl type provider you can expose the generated types from this F# project for use in C# projects.

Further information:

Tags: , , ,

Thursday, 3. January 2013

F# and Microsoft Dynamics NAV 2009 Web Services

Filed under: C#,Dynamics NAV 2009,F#,Navision,Visual Studio,WCF — Steffen Forkmann at 9:25 Uhr

If you are a Dynamics NAV developer you have probably heared of the web services feature which comes with the 2009 version. In this walkthrough you can learn how to create and consume a Codeunit Web Service. This method works very well if you only need to create the C# proxy classes once. If you have more than one developer, an automated build system, changing web services or many web services then you will come to a point where this code generation system is very difficult to handle.

Microsoft Visual F# 3.0 comes with feature called “type providers” that helps to simplify your life in such a situation. For the case of WCF the Wsdl type provider allows us to automate the proxy generation. Let’s see how this works.

Web service generation

In the first step we create the Dynamics NAV 2009 Codeunit web service in exactly the same way as in the MSDN walkthrough.

Connecting to the web service

Now we create a new F# console project (.NET 4.0 or 4.5) in Visual Studio 2012 and add references to FSharp.Data.TypeProviders, System.Runtime.Serialization and System.ServiceModel. After this we are ready to use the Wsdl type provider:

At this point the type provider creates the proxy classes in the background – no “add web reference” dialog is needed. The only thing we need to do is configuring the access security and consume the webservice:

Access from C#

This is so much easier than the C# version from the walkthrough. But if you want you can still access the provided types from C#. Just add a new C# project to the solution and reference the F# project. In the F# project rename Program.fs to Services.fs and expose the service via a new function:

In the C# project you can now access the service like this:

Changing the service

Now let’s see what happens if we change the service. Go to the Letters Codeunit in Dynamics NAV 2009 and add a second parameter (allLetters:Boolean) to the Capitalize method. After saving the Codeunit go back to the C# project and try to compile it again. As you can see the changes are directly reflected as a compile error.

In the next blog post I will show you how you can easily access a Dynamics NAV 2013 OData feed from F#.

Tags: , , ,

Thursday, 5. March 2009

Sample chapter from "Implementing Microsoft Dynamics NAV 2009" published on Navision-blog.de

Filed under: C#,Dynamics NAV 2009,English posts,msu solutions GmbH,Visual Studio — Steffen Forkmann at 14:39 Uhr

Implementing Microsoft® Dynamics™ NAV 2009"Implementing Microsoft Dynamics NAV 2009" is a new book by David Roys (MVP for Dynamics NAV) and Vjekoslav Babic (Dynamics NAV consultant). It shows the new features of Dynamics NAV 2009 in step-by-step explanations of real-world examples.

If you are interested in this book you can read the complete seventh chapter right here on navision-blog.de:

Chapter 6 (“Modifying the System”) is also available for download.

What the book covers

Chapter 1

The purpose of this chapter is a teaser introduction to get you excited about the product, what’s in it in general, and what’s in it as compared to previous versions, to give you a little taste of what’s coming up in the book, and explain what the fuss about this new release is all about.

Chapter 2

The RoleTailored client is the new user interface for users of Microsoft Dynamics NAV 2009, and it is completely different to the pervious versions. We’ll take you through the different components of the interface, introduce the terminology, explore the navigation components and page types, and teach you how to personalize the application to meet your own requirements using the extensive personalization features.

Chapter 3

Microsoft Dynamics NAV 2009 introduces a new paradigm to ERP. Instead of the system being focused on the forms that capture and present data and the functions the user can perform, the system is based around the individuals within an organization, their roles, and the tasks they perform. We cover how Microsoft researched the roles and explore the departments, roles, and tasks that have been identified in the Microsoft Dynamics Customer Model. We also show the reader how to assign the standard roles to users, how to create new roles, and how to allow departmental super users to configure the application for their role so that the change is applied to all users with the same profile.

Chapter 4

Microsoft Dynamics NAV is not a product with a Next-Next-Finish type of installation, and it takes a lengthy project to deploy it successfully. We focus on the six phases of the implementation process, and explain each phase with detailed dos and don’ts for a typical implementation. Based on the Dynamics Sure Step implementation methodology with advice liberally sprinkled throughout, special attention is given to new features of Microsoft Dynamics NAV 2009, and where the new capabilities must be taken into account to make most out of the implementation project.

Chapter 5

Every implementation of Microsoft Dynamics NAV 2009 will require the system to be configured to meet the needs of the business. This chapter tells the implementation consultant how to do this from a core financials perspective and provides valuable information that will allow developers to understand more about the application they are changing. We cover basic accounting for programmers, dimensions, and posting groups, and how to use the Rapid Implementation Methodology (RIM) Toolkit to speed things along.

Chapter 6

Hardly any standard system can fit the needs of a business out of the box. Either the customer must shape their processes to match the system, or the consultant must shape the system to match the processes, and usually the latter prevails. This chapter explains the process of modifying the system, how to design a viable data model, and how to design and develop a functional user interface for both RoleTailored and Classic clients, without writing any code.

Chapter 7

The three-tiered architecture of Microsoft Dynamics NAV 2009 and native Web Services Enablement open up a whole new world of possibilities for NAV implementations. We cover some of the many possibilities for extending the application, allowing the consultant and developer to understand the technologies that are available and their respective design considerations. Our practical examples introduce the NAV programmer to the world of .NET and show how you can use the information available on the internet to develop your own killer .NET add-ons.

Chapter 8

There’s much more to development than programming. It starts with understanding what customer really needs, and usually extends way beyond the system being deployed to a test environment. This chapter focuses on the development phase, and what it takes to get from a concept to a live and working solution.

Chapter 9

After the system goes live, or as it grows, there are periods when new problems may arise, and often their source is far from obvious. This chapter explores the tools and techniques available for detecting problems, pinpointing the source, and helping to remove them from the system quickly and painlessly. It explains how to debug the Service Tier, how to troubleshoot performance issues, what can be done to avoid problems, and how proper planning before design can help to get it right the first time.

Chapter 10

Our sample application focuses on requirements gathering, functional specification creation, solution design, and the eventual build of a prototype. We look at how a business problem can be explored using techniques such as interviewing, use-case modeling, and object-role modeling to create a solution design that can be molded into a working prototype.

If you want to get more information about the book visit: http://www.packtpub.com/implementing-microsoft-dynamics-nav-2009/book

Tags: ,

Sunday, 11. January 2009

Deutsche Add On Module für Dynamics NAV 2009 verfügbar

Filed under: Dynamics NAV 2009,msu solutions GmbH — Steffen Forkmann at 14:26 Uhr

Seit dem 22.12.2008 ist die Add On Datenbank für NAV2009 mit den Modulen Zahlungsverkehr und Kostenrechnung zum Download auf Partnersource verfügbar.

“Dieses Release beinhaltet folgende Dateien:

  • Klassische fdb Datenbank
  • MDF Datenbank für SQL Server
  • Onlinehilfe für den Zahlungsverkehr (DEU und ENU)
  • Changes.doc für Zahlungsverkehr und Kostenrechnung

Die Objekte für den Zahlungsverkehr beinhalten auch die SEPA Funktionalität.
Die Onlinehilfe für die Kostenrechnung wird umgehend nachgereicht.”

[Quelle Partnersource]

Weitere Links:

Tags: , , ,

Monday, 17. November 2008

Dynamics NAV 2009 released und zum Download verfügbar

Filed under: Dynamics NAV 2009 — Steffen Forkmann at 17:17 Uhr

Heute ist es endlich soweit – Dynamics NAV 2009 steht offiziell zum Download (1.2GB) auf PartnerSource bereit. Der Download ist zwar bereits seit Samstag verfügbar, aber aus unbekannten strategischen Gründen war diese Information mal wieder "Partner Confidential" und es wurde darum gebeten nicht vor dem 19.11.2009 darüber zu bloggen. Da die Katze jetzt aber offiziell aus dem Sack ist: "Happy Downloading!" 😉

Weitere Information sind im Launch Portal zu finden.

Tags: ,

Thursday, 10. July 2008

BASTA! 2008 – Die BASTA! wird 20

Filed under: Dynamics NAV 2009,Steffen,Veranstaltungen — Steffen Forkmann at 16:44 Uhr

Vom 22. bis 26. September findet die diesjährige BASTA! in Mainz statt. Wie letztes Jahr werde ich im “Business Applications”-Track einen Vortrag über die Programmierung mit Microsoft Dynamics Nav halten. Diesmal werde ich sogar über Dynamics NAV 2009 sprechen können.

“Dynamics NAV ist eines der erfolgreichsten ERP-Systeme für den Mittelstand. Durch die riesige Vielfalt an vorgefertigten Prozessen ist es die ideale Grundlage für eigene Geschäftsanwendungen. Mit der Version "NAV 2009" bekommt das ERP-System eine neue auf .NET-basierende Architektur. Der Vortrag gibt einen Einblick in die Neuerungen und zeigt, wie man eigene Kundenanpassungen darin vornehmen kann.”


Tags: , ,

Tuesday, 4. March 2008

Microsoft Dynamics NAV und SharePoint – Buchverlosung

Filed under: .NET 3.0,Dynamics NAV 2009,msu solutions GmbH,Navision — Steffen Forkmann at 15:37 Uhr

Navision-Blog.de verlost zum 18.3. zwei neue und originalverpackte Bücher zum Thema SharePoint-Administration von Microsoft Press. Dabei handelt es sich konkret um:

Microsoft SharePoint-Technologien -Taschenratgeber für Administratoren

Von: Ben Curry – 442 Seiten

SharePoint & Co. – Technologien und Tools im Teamwork – Baukasten für Administratoren und Power User

Von: MindBusiness / HanseVision – 779 Seiten (CD-Rom)

SharePoint SharePoint 2

Da mit Dynamics NAV “6.0” (NAV 2009) mit SharePoint ein zweiter Navision-Client eingeführt werden soll, möchte ich einfach nur wissen, welche Erfahrungen ihr bislang mit Navision + SharePoint gesammelt habt und wie Ihr die Zukunft für diesen NAV-Client seht.
NAV-Daten im SharePoint anzuzeigen geht ja schon eine ganze Weile, aber zukünftig besteht ein vollständiger Zugriff auf die Geschäftslogik von NAV. Ein kurzer Kommentar dazu (mit E-Mail-Adresse) – oder ein Trackback auf diesen Artikel reichen um an der Verlosung teilzunehmen.

PS: Der Rechtsweg ist ausgeschlossen 🙂

Tags: , , , , ,

Saturday, 1. March 2008

Integration einer Quellcodeverwaltung in Dynamics NAV

Filed under: .NET 3.0,C#,Dynamics NAV 2009,Navision,Tools,Visual Studio — Steffen Forkmann at 12:45 Uhr

Wie bereits vor einiger Zeit im Blog berichtet, habe ich für unseren internen Produktionsablauf ein Tool geschrieben, das es ermöglicht eine Quellcodeversionsverwaltung (z.B. VSS, SVN oder Team Foundation Server) direkt in Dynamics NAV zu integrieren. Jetzt habe ich mir mal die Mühe gemacht, die wichtigsten Funktionen in einem kleinen Screencast zu dokumentieren. (Dies ist jedoch erstmal nur eine Vorabversion des Videos.) 

Das Schöne an diesem Tool ist, dass man aus beiden Blickrichtungen alle nötigen Informationen zu einer Version bekommt. Ich sehe also an der Datei die Änderungshistorie mit den entsprechenden ChangeRequests oder Ticketnummern und kann auch rückwärts an einer Aufgabe sehen, welche Änderungen dafür konkret am Quellcode gemacht wurden und von wem.

Für Visual Studio-Nutzer ist das natürlich nichts neues, aber gerade im ERP-Bereich wird oft (mangels fehlender Tools) auf eine Quellcodeverwaltung verzichtet.

Tags: , , , , , , ,

Friday, 30. November 2007

Microsoft Dynamics NAV 5.0 SP1 – Was gibt es neues?

Filed under: msu solutions GmbH,Navision — Steffen Forkmann at 21:16 Uhr

Da Dynamics NAV “6.0” noch eine Weile auf sich warten lässt, wird es vermutlich im ersten Quartal 2008 ein ServicePack 1 für Dynamics NAV 5.0 geben. Martin Nielander (Microsoft Dynamics NAV Program Manager) schreibt nun im “Microsoft Dynamics NAV Sustained Engineering Team Blog” über die darin enthaltenen Neuerungen.

Hier ein Auszug:

  • SQL-Server Perfomance:
    • SIFT soll im SQL Server über Indexed Views abgebildet werden
    • Bulk Insert” zur Reduzierung der SQL Server Roundtrips
  • Navision-Applikationsänderungen:
    • Anlagenbuchhaltung wird nun auch 365 Tage abschreiben können (statt 360)
    • Am Debitor/Kreditor wird das Saldo-Feld im DrillDown nur Offene Posten anzeigen
    • Das Buchungdatum wird in den Zeilen der gebuchten Belege angezeigt 😉

Der gesamte Artikel ist hier zu finden.

Tags: , ,