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


"Every solution will only lead to new problems."

Category Navision

In dieser Kategorie geht es um Microsoft Dynamics .NAV (ehemals Microsoft Navision) einem ERP-System, das besonders für kleine und mittelständische Unternehmen von Microsoft-Partnern (wie der msu solutions GmbH) im Bereich Business Solutions vertrieben wird.

Wednesday, 7. July 2010


Strange bug in Dynamics NAV client

Filed under: Dynamics NAV 2009,Navision — Steffen Forkmann at 7:34 Uhr

My colleague Mathias Meissner found a strange bug in the Dynamics NAV Client (occurs at least in the native clients for NAV 403, 501 and 601). It seems the following code creates a strange memory allocation issue. (Download sample)

OBJECT Codeunit 99500 NAV Bug
{
  OBJECT-PROPERTIES
  {
    Date=17.06.10;
    Time=14:30:30;
    Modified=Yes;
    Version List=;
  }
  PROPERTIES
  {
    OnRun=BEGIN
            TestMiddleCase;  // comment this line out and ReverseString works!
            TestReverseString;
          END;

  }
  CODE
  {

    PROCEDURE TestMiddleCase@5128500();
    BEGIN
      MiddleCase('fooo AnD bar');
    END;

    PROCEDURE TestReverseString@5128502();
    VAR
      l_String@5128500 : Text[1024];
      l_Result@5128503 : Integer;
    BEGIN
      l_String :=
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011' +
        '1101101111011011110110111101101111011011110110111101101111011011';

      IF STRLEN(l_String) <> 512 THEN
        ERROR('Wrong strlen');

      l_Result := TestReverseStringSub(l_String);

      IF l_Result <> 512 THEN
        ERROR('Error: Actual: ' + FORMAT(l_Result) + ' ' + ' Expected: 512');
    END;

    PROCEDURE TestReverseStringSub@5128521(p_String@5128500 : Text[1024]) r_Int : Integer;
    VAR
      l_StringMgt@5128501 : Codeunit 5128519;
    BEGIN
      p_String := ReverseString(p_String);
      EXIT(STRLEN(p_String));
    END;

    PROCEDURE ReverseString@5128509(p_In@5128502 : Text[1024]) Result : Text[1024];
    VAR
      i@5128500 : Integer;
      l_Length@5128501 : Integer;
    BEGIN
      l_Length := STRLEN(p_In) + 1;

      FOR i := 1 TO l_Length - 1 DO
        Result[i] := p_In[l_Length-i];
    END;

    PROCEDURE MiddleCase@1000000000(p_StringToConvert@1000000000 : Text[250]) ConvertedString : Text[250];
    BEGIN
      ConvertedString :=
        UPPERCASE(COPYSTR(p_StringToConvert, 1, 1)) +
        LOWERCASE(COPYSTR(p_StringToConvert, 2));
    END;

    BEGIN
    END.
  }
}

Since we don’t do anything evil here my only advice is to initialize every return parameter with a default value. This seems to fix the bug.


    PROCEDURE ReverseString@5128509(p_In@5128502 : Text[1024]) Result : Text[1024];
    VAR
      i@5128500 : Integer;
      l_Length@5128501 : Integer;
    BEGIN
      Result := ''; // Init return value – this fixes the issue!
      l_Length := STRLEN(p_In) + 1;

      FOR i := 1 TO l_Length - 1 DO
        Result[i] := p_In[l_Length-i];
    END;

Interestingly I didn’t find a smaller sample which reproduces this memory issue.

https://itpilloleinlinea.com
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

https://kopapilleronline.com
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

Hinweis:
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: , , ,

Tuesday, 9. December 2008


Dynamics NAV Hilfe erstmals auf MSDN verfügbar

Filed under: Dynamics NAV 2009 — Steffen Forkmann at 11:12 Uhr

Die Dynamics NAV 2009 Entwickler-Hilfe ist ab heute auf MSDN verfügbar. Damit ist es in Kürze auch möglich über Suchmaschinen in der Hilfe zu suchen. Laut dem Microsoft Dynamics NAV Team Blog wird die Hilfe dort auch ständig aktualisiert, so dass NAV 2009-Entwickler und -Administratoren ab heute wohl die Onlinevariante bevorzugen sollten.

Unter anderem werden auch folgende Themen beschrieben:

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, 16. October 2008


Debugging in Dynamics NAV 2009

Filed under: .NET 3.0,C#,Dynamics NAV 2009,msu solutions GmbH,Visual Studio — Steffen Forkmann at 13:41 Uhr

Claus Lundstrøm zeigt in einem schönen Blogpost wie man in NAV2009 den Code auf Seite der ServiceTier (also auch remote) debuggen kann – und zwar über Visual Studio 2008 direkt im generierten C#-Code. Mit dieser Variante ist man nicht mehr gezwungen das Debugging über den Classic-Client zu tun, sondern kann direkt aus dem Dynamics NAV RoleTailored-Client debuggen.

Dummerweise ist der generierte C#-Code, wie das bei generiertem Code eigentlich immer der Fall ist, nicht gerade “optisch schöner” C#-Style und hat auch nur noch wenig mit dem Original-C/AL-Code zu tun – ist aber immerhin lesbar.

Das ist ein wirklich interessanter Ansatz und erlaubt mit etwas Geschick auch UnitTesting für NAV 2009. Dafür werde ich demnächst mal versuchen ein kleines Beispiel zu bloggen.

Tags: , , , , ,

Wednesday, 8. October 2008


Folien vom ERP Launch und dem Technical Airlift verfügbar

Filed under: Dynamics NAV 2009,Veranstaltungen — Steffen Forkmann at 9:55 Uhr

Die Folien vieler Vorträge von der diesjährigen Microsoft-ERP-Launchveranstaltung sowie vom Technical Airlift 2008 sind nun zum Download verfügbar. In insgesamt 29 Präsentation und 2 Videos werden die Neuheiten von Dynamics AX 2009 und Dynamics NAV 2009 vorgestellt.

Tags: , , , ,

Friday, 26. September 2008


Blogwelle zu NAV 2009 gestartet

Filed under: Blogs,Dynamics NAV 2009 — Steffen Forkmann at 11:43 Uhr

Wie ich vermutet habe, holen viele NAV-Blogger heute (nach dem Aufheben der NDA) ihre vorbereiteten Artikel heraus und bloggen ausführlich zur neuen Navision-Version. Unter anderem weist Kine’s Info auf das Syntax-Hightlighting in NAV 2009 hin und Waldo zeigt auch erste Screenshots der neuen Version.

Interessant sind aber auch die schon etwas länger existierenden Artikel, die im NAV Developers Blog veröffentlicht werden. Dort wird z.B. auf die Erstellung von Key Performance Indicators in NAV 2009 eingegangen.

Claus Lundstrøm setzt sich in seinem Blog mit dem Thema Drop Down Windows in NAV 2009 auseinander und hat jetzt auch eine Liste der in NAV 2009 verfügbaren Icons veröffentlicht.

Tags: , , ,

Marketing Beta für Dynamics NAV 2009 verfügbar

Filed under: Dynamics NAV 2009,Veranstaltungen — Steffen Forkmann at 11:01 Uhr

Nachdem ich gestern auf der BASTA! 2008 in Mainz einen Vortrag über NAV 2009 halten durfte, ist nun auch heute endlich das offizielle Marketing-Beta-Package zum Download (4802 MB) auf PartnerSource verfügbar.

Das “Microsoft Dynamics NAV 2009 Marketing Beta Release” ist ein Paket aus einem Virtual PC-Image von Microsoft Dynamics NAV 2009 (Marketing Beta) und einer Reihe von zugehörigen Dokumenten. Dabei handelt es sich unter anderem um eine Hilfedatei mit “Walk-through scenarios from the User Documentation” und Powerpoints zu Web Services, Reporting und dem Page Designer in NAV 2009.

Mit der Veröffentlichung der Marketing Beta (CTP4) ist nun auch die Zeit der Verschwiegenheitsvereinbarung (NDA) der CTP3 vorbei und es kann ausführlich zu technischen Details von NAV 2009 gebloggt werden.

Ich fange bei dieser Gelegenheit mal mit den zugehörigen Dokumenten der Marketing Beta an und werde in späteren Postings natürlich auch auf die CTP4 selbst eingehen.

Bei dem Hilfedokument handelt es sich z.B. nur um eine Vorabversion der eigentlich NAV 2009-Hilfe, so dass einige Bereiche nur als Platzhalter angelegt sind. 😉

Teile der Hilfe sind noch Platzhalter

Insgesamt muss man aber sagen, dass die Hilfe (auch jetzt schon) wesentlich umfangreicher ist, als das bisher bei Navision-Hilfen der Fall war. Gerade die Bereiche zum Thema Reporting und Form Transformation sind auch schon sehr detailliert ausgeführt. Dabei setzt man nun z.B: auch verstärkt auf Ablaufdiagramme:

image

Weiterhin ist geplant die NAV-Hilfe mit ins MSDN zu integrieren, so dass Dokumentationsupdates leichter zur Verfügung gestellt werden können. Ein weiterer netter Nebeneffekt vom MSDN ist natürlich, dass man dann mit der Suchmaschine seiner Wahl die Hilfe durchsuchen kann.

Zu den drei Powerpoints gibt es eigentlich nicht viel zu sagen, außer das sie sich in ihrer Aussagekraft sehr stark unterscheiden. Die PPT zum Thema WebService zum Beispiel zeigt relativ detaillierten Quellcode, während die zum Thema PageDesigner überhaupt keine Informationen enthält. Lustigerweise steht bei letzterer Präsentation “Mircrosoft Confidential” drunter. 😉

Zusätzlich gibt es derzeit noch ein Dokument mit den Systemvoraussetzungen und eins mit den Release Notes bzw. Known Issues der CTP4.

Tags: , , ,

Sunday, 21. September 2008


Folien zur Microsoft-Partnerkonferenz 2008

Filed under: Dynamics NAV 2009,SQL Server,Veranstaltungen — Steffen Forkmann at 14:31 Uhr

Die Folien vieler Vorträge von der diesjährigen Microsoft-Partnerkonferenz sind nun zum Download verfügbar. In insgesamt 47 Präsentation werden die unterschiedlichsten Bereiche gezeigt, in denen Microsoft zusammen mit seinen Partnern Geld verdienen will.

http://www.microsoft.com/germany/partner/trainings/pk_2008/default.aspx

Tags: ,