• Microsoft Dynamics NAV Team Blog

    Cumulative Update 18 for Microsoft Dynamics NAV 2013 has been released

    • 2 Comments

    Cumulative update 18 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013.

    The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions: 

         *   AU - Australia

         *   AT - Austria

         *   BE - Belgium

         *   CH - Switzerland

         *   DE - Germany

         *   DK - Denmark

         *   ES - Spain

         *   FI   - Finland

         *   FR - France

         *   IS  - Iceland

         *   IT   - Italy

         *   NA - North America

         *   NL - Netherlands

         *   NO - Norway

         *   NZ - New Zealand

         *   SE - Sweden

         *   UK - United Kingdom

    Where to find cumulative update 18

    You can download cumulative update 18 from KB 2992503 - Cumulative Update 18 for Microsoft Dynamics NAV 2013 (Build 37798).

    For a full list of all hotfixes included in cumulative updates for Microsoft Dynamics NAV 2013, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

         *  Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013

    PartnerSource:

         *   Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013

    More Information

    For a list of all released cumulative updates, see Released Cumulative Updates for Microsoft Dynamics NAV 2013.

  • Microsoft Dynamics NAV Team Blog

    Cumulative Update 11 for Microsoft Dynamics NAV 2013 R2 has been released

    • 3 Comments

    Cumulative update 11 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 R2.

     The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    •   AU - Australia
    •   AT - Austria
    •   BE - Belgium
    •   CH – Switzerland
    •   CZ – Czech Republic
    •   DE - Germany
    •   DK - Denmark
    •   ES - Spain
    •   FI  - Finland
    •   FR - France
    •   IS - Iceland
    •   IT - Italy
    •   NA - North America
    •   NL - Netherlands
    •   NO - Norway
    •   NZ - New Zealand
    •   RU – Russia
    •   SE - Sweden
    •   UK - United Kingdom

    Where to find cumulative update 11

    You can download cumulative update 11 from KB 2992495  – Cumulative Update 11 for Microsoft Dynamics NAV 2013 R2 (Build 37799). 

    For a full list of all hotfixes included in cumulative updates for Microsoft Dynamics NAV 2013 R2, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

         *  Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013 R2

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013 R2

    PartnerSource

         *   Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013 R2

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013 R2

    More Information

     For more information about cumulative updates for Microsoft Dynamics NAV 2013 R2, see Announcement of update rollups for Microsoft Dynamics NAV 2013 R2.

     

  • Microsoft Dynamics NAV Team Blog

    Reservations versus Planning and Projected availability calculation

    • 0 Comments

    Nice and interesting topic when it comes to planning, existing reservations and how projected inventory work together.

    To start with, our NAV Supply Planning White Paper is clear:

    ...

    The planning system does not include any reserved quantities in the calculation. For example, if a sales order has been totally or partially reserved against the quantity in inventory, the reserved quantity in inventory cannot be used to cover other demand. The planning system does not include this demand-supply set in its calculation.

    However, the planning system will still include reserved quantities in the projected inventory profile because all quantities must be considered when determining both when the reorder point has been passed and how many to reorder to reach and not exceed the maximum inventory level. Consequently, unnecessary reservations will lead to increased risks that inventory levels run low because the planning logic does not detect reserved quantities.

    ...

    I believe the first paragaph above is reasonable. Planning assumes demand is replenished for the reserved quantity and that reserved supply cannot be used for any other demand. Clear. Based on this, planning is not including the demand/supply set which is reserved one against the other. Any other portion of the demand (unreserved portion) which requires to be replenished is included into the planning calculation since we will require planning actions here. 

    Now, the missunderstanding comes with second paragraph.The projected inventory is used by the planning system to monitor the reorder point and to determine how much to reorder quantity when using Reordering Policy="Maximum Qty.". And, as said on second paragraph above, this includes reserved quantities. This projected inventory calculation is meaningful with reorder point when stock level is evaluated to determine if new replenishment is required. To determine this stock level all projected inventory is included ... regardless if reserved or not. The stock will be there ... so it needs to be considered. An example: assume we are using Reordering Policy= "Max. Quantity". This means, most of the time, our warehouse has a maximum capacity that we cannot exceed. In other words, we cannot go above this maximum inventory level (maximum capacity) ... so we need to include reserved quantities since that is truly using our warehouse capacity. That is why reserved quantities are included. Unnecessary reservation will lead to the fact that stock is there (ie. above the certain stock level) but it is reserved to another demand.

    To summarize, if demand/supply are reserved, these will be respected in planning. And, if this is a reorder point item, reservations will be included into the projected inventory calculation which means it might disturb planning since might not be available.

  • Microsoft Dynamics NAV Team Blog

    Windows Regional Settings and Number Formatting in RDLC Reports

    • 2 Comments

    You probably know this blog post from Robert Miller: http://blogs.msdn.com/b/nav/archive/2014/03/25/formatted-decimal-values-dropping-symbols-in-rdlc.aspx. It talks about changing/forcing number formats when Windows is not able to do so. For Switzerland (de-CH), number formats in Windows are not correct regarding the thousands separator. It should be formatted “1’234,56” but is formatted like “1 234,56” (a space instead of an apostrophe). 

    Current status

    Due to the nature of RDL and the option to specify a language name for each and every single TextBox Control, Report Viewer does not pick specific user changes for decimal or date formats, even if the requested regional setting is equal to the current user's regional setting. Report Viewer retrieves the default culture settings for a language name, but does not take into account, that this setting (when selected as current/default user format) may have changed the number format.

     

     

    So ReportViewer never knows about the current regional settings and the changed symbols when looking up and using the default settings. So for our friends from Switzerland, there is currently only one known option: manually change the thousands separator and re-format the RDLC decimal values. The drawback of this is that every decimal expression has to be changed in all affected reports.

    Talking about the world and everything

    Due to a talk between buildings K and L in Munich a while ago, we came across localization topics, globalization and ways to force specific locales (and number symbols) for a Windows Forms application. Unfortunately, there is no way, because globalization changes are only supported for web.config, not app.config (see http://msdn.microsoft.com/en-us/library/vstudio/bz9tc508(v=vs.100).aspx). Not talking about different threads and (from my knowledge) no inheritance of culture information to the ReportViewer thread.

    But this discussion caused me to start searching the web and I came across custom locales (http://msdn.microsoft.com/en-us/library/windows/desktop/dd317785(v=vs.85).aspx). There is also a tool to create custom locales named Locale Builder (Download at http://www.microsoft.com/en-us/download/details.aspx?id=41158). 

    The end is near

    With the Locale Builder tool, you can create custom locales with changed number symbols, build an MSI file of it, and the *REPLACE* an existing locale in Windows by assigning the same name to the new locale:

     

    The new locale is installed using the MSI file, replaces the default locale (in this case for de-CH), and is marked with an asterisk as a custom locale: 

    Now, by default, the correct grouping symbol is used and shown when selecting de-CH, even without changing it manually: 

    With this in mind, what do you think is the result when a Report is executed on this system without any change? See fields VK-Preis (Sales Price) or Betrag (Amount). 

     

    BANG – Great!

     

    Serving some white wine with the fish

    However, when printing reports for foreign countries, it always uses the new default format now. Better than before, but not like a world champion would do…

    So, in Object Designer, open table 8 Language in design mode and add the following function: 

    GetLanguageName(LanguageCode : Code[10]) : Text[10]
    CultureInfo := CultureInfo.GetCultureInfo(GetLanguageID(LanguageCode));

    EXIT(CultureInfo.Name);

    Name         

    DataType

    Subtype

    CultureInfo

    DotNet

    System.Globalization.CultureInfo.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    Save table 8.

    Open report 206 in design mode and add a new column to the DataItem Sales Invoice Header

    Language.GetLanguageName("Language Code")             Name: "LanguageName"

    Now open the report layout for report 206 and bulk-select all TextBox controls in each Tablix. When selected, change the property Language for all controls to =Fields!LanguageName.Value.

    Save everything and run report 206 for to show all posted invoices in the database. For all different languages, you should see correct decimal symbols.

    Love it? 

     

    Carsten Scholling

    Microsoft Dynamics Germany
    Microsoft Global Business Support (GBS) EMEA

    Microsoft Connect: http://connect.microsoft.com
    Online Support: http://www.microsoft.com/support

  • Microsoft Dynamics NAV Team Blog

    Select multiple filter values on a request page for an option field in Web client compared to Windows Client

    • 0 Comments

    Unfortunately, it is not possible to select multiple filter values for an option field on a request page of a report in the Web Client. This is however possible in the Windows Client. In the GUI of the Web Client it is possible to select a range as a filter though there is no underlying coding that supports this. Documentation around limitations of Web Client can be found here.

    The Web Client was originally designed for an occasional use as opposed to intensive use for which we have the Windows Client. Partner and Customer feedback has clearly indicated that the strengths of the Web Client (e.g., easy to deploy, runs in major browsers) have pushed adoption well beyond its’ intended use. In feature releases we will therefore address the functionality of the Web Client further.

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

    Marco Mels
    Microsoft Dynamics NAV

  • Microsoft Dynamics NAV Team Blog

    Cumulative Update 10 for Microsoft Dynamics NAV 2013 R2 has been released

    • 9 Comments

    Cumulative update 10 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 R2.

     The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    •   AU - Australia
    •   AT - Austria
    •   BE - Belgium
    •   CH – Switzerland
    •   CZ – Czech Republic
    •   DE - Germany
    •   DK - Denmark
    •   ES - Spain
    •   FI  - Finland
    •   FR - France
    •   IS - Iceland
    •   IT - Italy
    •   NA - North America
    •   NL - Netherlands
    •   NO - Norway
    •   NZ - New Zealand
    •   RU – Russia
    •   SE - Sweden
    •   UK - United Kingdom

    License Versioning

    Microsoft Dynamics NAV 2013 R2 Cumulative Update 10 introduces license key versioning to Microsoft Dynamics NAV. Observe the following specifications:

    • Microsoft Dynamics NAV 2013 R2 license keys will continue to be backward compatible with Microsoft Dynamics NAV 2013 instances.
    • Microsoft Dynamics NAV 2013 license keys cannot not be used with Microsoft Dynamics NAV 2013 R2 instances. Accordingly, newly issued Microsoft Dynamics NAV 2013 license keys will not work with Microsoft Dynamics NAV 2013 R2 CU10 (or later) instances.
    • Microsoft Dynamics NAV 2013 and Microsoft Dynamics NAV 2013 R2 license keys are not forward compatible with Microsoft Dynamics NAV 2015 instances.

     More details about license versioning will be made available in the October 2014 release of the Microsoft Dynamics Perpetual Licensing Guide.

    Where to find cumulative update 10

    You can download cumulative update 10 from KB 2984452 – Cumulative Update 10 for Microsoft Dynamics NAV 2013 R2 (Build 37563). We listed a different build number when this blog post published the first time, and we apologize for the resulting confusion. the correct build number is 37563.

    For a full list of all hotfixes included in cumulative updates for Microsoft Dynamics NAV 2013 R2, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

         *  Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013 R2

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013 R2

    PartnerSource

         *   Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013 R2

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013 R2

    More Information

     For more information about cumulative updates for Microsoft Dynamics NAV 2013 R2, see Announcement of update rollups for Microsoft Dynamics NAV 2013 R2.

     

  • Microsoft Dynamics NAV Team Blog

    Cumulative Update 17 for Microsoft Dynamics NAV 2013 has been released

    • 0 Comments

    Cumulative update 17 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013.

    The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions: 

         *   AU - Australia

         *   AT - Austria

         *   BE - Belgium

         *   CH - Switzerland

         *   DE - Germany

         *   DK - Denmark

         *   ES - Spain

         *   FI   - Finland

         *   FR - France

         *   IS  - Iceland

         *   IT   - Italy

         *   NA - North America

         *   NL - Netherlands

         *   NO - Norway

         *   NZ - New Zealand

         *   SE - Sweden

         *   UK - United Kingdom

    Where to find cumulative update 17

    You can download cumulative update 17 from KB 2984829 - Cumulative Update 17 for Microsoft Dynamics NAV 2013 (Build 37532).

    For a full list of all hotfixes included in cumulative updates for Microsoft Dynamics NAV 2013, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

         *  Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013

    PartnerSource:

         *   Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013

         *  Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013

    More Information

    For a list of all released cumulative updates, see Released Cumulative Updates for Microsoft Dynamics NAV 2013.

  • Microsoft Dynamics NAV Team Blog

    Filter values specified on a request page for a report are not saved by the Web Client

    • 1 Comments

    When running a report from the Windows Client with Microsoft Dynamics NAV 2013 R2, filter values specified on the request page are saved along with the relevant user’s personalization information. These filter values are conveniently restored to the request page the next time the user runs the same report.

    The Web Client does not save such personalization information so the filter values cannot be restored to the request page when the user runs the same report subsequently if they are using the Web Client. This is one of the known feature limitations of the Microsoft Dynamics NAV Web Client.

    For more information about feature limitations of the Microsoft Dynamics NAV Web Client click here.

  • Microsoft Dynamics NAV Team Blog

    Temporary Issue with Single Sign-On for Office 365

    • 0 Comments

    On August 13, the Single Sign-On (SSO) protocol that is used in Microsoft Azure Active Directory (Azure AD) was updated, which unfortunately caused the SSO implementation in Microsoft Dynamics NAV 2013 R2 to fail temporarily. As a result, users could not log into Microsoft Dynamics NAV using their Office 365 credentials.

    The problem was resolved later in the day so that single sign-on was again working for Microsoft Dynamics NAV users using Office 365 credentials. However, we have decided to change the way we handle authentication against Microsoft Azure AD so that we are less sensitive to this type of update to the SSO protocol. The new design will be part of the Cumulative Update 11 for Microsoft Dynamics NAV 2013 R2. 

     

     

    ----- This blog post was updated on August 14 -------

  • Microsoft Dynamics NAV Team Blog

    Compatibility with SQL Server 2014

    • 8 Comments

    SQL Server 2014 released earlier this year with many new and interesting capabilities. For further information, please take a look at the product information at this location: http://www.microsoft.com/en-us/server-cloud/products/sql-server/default.aspx.

    Over the last few months, the Microsoft Dynamics NAV team has been testing compatibility with this new version of SQL Server, and we are now proud to announce that Microsoft Dynamics NAV 2013, Microsoft Dynamics NAV 2013 R2, and Microsoft Dynamics NAV 2009 R2 are compatible with SQL Server 2014!

    Please note that this applies to the following editions of Microsoft SQL Server:

    • Standard Edition
    • Enterprise Edition

    Best regards,

    The Dynamics NAV team

     

    ----- This blog post was updated on August 14, 2014. -----

  • Microsoft Dynamics NAV Team Blog

    Debug and Bulk Insert in Microsoft Dynamics NAV 2013 R2

    • 1 Comments

    We recently received some cases related to an unexpected behavior with the Microsoft Dynamics NAV Debugger when the Bulk Insert feature is enabled.

    The Bulk Insert functionality is duly described in the MSDN Library at http://msdn.microsoft.com/en-us/library/dd355341(v=nav.70).aspx. Here you can see that Microsoft Dynamics NAV automatically buffers inserts in order to send them to Microsoft SQL Server at one time. In this way, performance is improved since the number of server calls is reduced.

    So far, so good.

    But when you enable debugging in a scenario that falls into a violation of a Primary Key in SQL Server due to several concurrent INSERT calls, you might find that the Microsoft Dynamics NAV Debugger will not stop in the exact INSERT statement but, due to delayed Bulk Insert, in a position right after the INSERT AL Statement sequence. 

    For example, create a codeunit with the following code:

    IF NOT CONFIRM(‘Please enable debugging, and then click OK’) THEN

      ERROR(‘Action canceled’);

    GLEntry.INIT;

    GLEntry.”Entry No.” = 111;

    MESSAGE(‘Insert GL Entry record’);

    GLEntry.INSERT;

    MESSAGE(‘Try to insert duplicate GL Entry record’);

    GLEntry.INSERT;

    MESSAGE(‘Do something. Such as FINDLAST’);

    GLEntry.FINDLAST;

    ERROR(‘End of scenario’);

    Run the codeunit, and then, when prompted, enable debugging against the current session.

    Normally, you would expect to have debugger stop exactly in the second INSERT statement due to the violation of Primary Key (duplicate) but in this scenario, the debugger stops in the FINDLAST statement. This behavior is due to Bulk Insert feature that would delay the INSERT and therefore the error message will be catch only after the last INSERT statement.

    Workaround

    Microsoft Dynamics NAV 2013 R2 introduced a configuration parameter in the CustomSettings.config file for the Microsoft Dynamics NAV Server service:

      <!--

        Specifies whether to enable the SQL Buffered Insert functionality to buffer rows that are being inserted into a database table.

        When this parameter is enabled, up to 5 rows will be buffered in the table queue before they are inserted into the table. 

        To optimize performance in a production environment, you should set this parameter to TRUE (enabled). In a test environment,

        you can set this parameter to FALSE (disabled) to debug SQL insert failures.

      -->

      <add key="BufferedInsertEnabled" value="True" />

    With a brief explanation on how to turn on and off this feature. If you simply change this parameter from True to False (in the Microsoft Dynamics NAV Server Administration tool, on the General tab, clear the Enable Buffered Insert field), restart the service, and then run the same codeunit as described above. Now the debugger stops exactly in the violation of Primary Key in the duplicate attempt (INSERT).

    The aforementioned behavior also reproduces with Microsoft Dynamics NAV 2009 R2 and Microsoft Dynamics NAV 2013. With these version, you cannot trigger on and off the Bulk Insert feature, but you can apply a workaround if you would like to fall back to the classic INSERT instead of the automatic enablement of the Bulk Insert feature.

    The workaround is pretty simple: temporarily violate one of the following constraint for Bulk Insert that would fall back to classic INSERT into SQL Server. The easiest and most feasible one is to simply add a BLOB field in the Table structure (just add the field, you do not need to populate this). Save and Compile the table and magically you will not have the Bulk Insert effect when you need to debug. Of course, we do recommend to perform this action in a staging or test environment.

     

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

     

    Duilio Tacconi                                      Microsoft Dynamics Italy         

    Microsoft Customer Service and Support (CSS) EMEA

    Special thanks to Nacho Galajares, Antonio Cerrolaza from tipsa.net and Tobias Fenster, Stefan Konrad from infoma.de 

  • Microsoft Dynamics NAV Team Blog

    Costing Error Detection and Data Correction white paper - updated for Microsoft Dynamics NAV 2013

    • 0 Comments

    The Costing Error Detection and Data Correction white paper and report has been updated for Microsoft Dynamics NAV 2013 and 2013 R2.

    The Costing Error Detection and Data Correction white paper discusses common inventory costing issues and how you can correct erroneous data after inventory costing issues have been identified. The white paper focuses on the data and the fields that typically cause problems in the cost adjustment process.

    The Costing Error Detection report can help you find common costing data problems. If the report shows that there are errors in your database, you can use the suggestions in the white paper to correct the data. The report can also be used to validate inventory data after an upgrade.

    To review the white paper and download the report for Microsoft Dynamics NAV 2013 and earlier versions, go to:

     

  • Microsoft Dynamics NAV Team Blog

    Announcement about Tax Updates Dependent on Cumulative Updates (CU) in Microsoft Dynamics NAV

    • 1 Comments

    This announcement describes upcoming changes around processes related to Tax Updates released for Microsoft Dynamics NAV.

    1. Tax Updates to be Built with Cumulative Update as a Baseline

    Effective July 15, 2014, all Tax Updates (commonly referred to as Regulatory Features) will be developed based on the latest Cumulative Updates as their baseline instead of the current practice of basing the same on an RTM release.

    This move will provide an improvement in quality, because a Tax Update is built on the latest baseline and state of code compared to the previous process of building on an older RTM version.

    This new process also now ensures that partners will have all Application level hotfixes in place. These were not included previously when a Tax Update was delivered, which meant that partners had to merge the hotfixes again while deploying the Tax Update.

    Example Scenario

    Version: Microsoft Dynamics NAV 2013/Country X

    Cumulative Updates Released 

    Update

    Release Date

    Microsoft Dynamics NAV 2013 RTM Country X

    September 2012

    CU 12

    March 2014

    CU 13

    April 2014

    CU 14

    May 2014

    CU 15

    June 2014

     

    Tax Updates Released 

    Tax Update

    Release Date

    Tax Update 1

    March 2013

    Tax Update 2

    April 2014

    Tax Update 3

    Developed and released in July 2014

     

    Current Model

    Tax Update 3 for Country X on Microsoft Dynamics NAV 2013 is developed using the following baseline or has the following prerequisites for installation:

    • Microsoft Dynamics NAV 2013 RTM X     +
      • Tax Update 1 + 
        • Tax Update 2

    New Model

    Tax Update 3 for Country X on Microsoft Dynamics NAV 2013 is developed and has only the following prerequisite:

    • Microsoft Dynamics NAV 2013 CU 15

    2. Tax Updates to be Released Only Through Cumulative Updates

    Effective October 1, 2014, all Tax Updates for Microsoft Dynamics NAV will be developed on CU as described in section 1 of this announcement and will be released only through Cumulative Updates. Microsoft Dynamics NAV
    will no longer release individual .fob or text files for a Tax Update.

    Partners now benefit by having all regulatory features in sync with the latest application code, a single and one stop quality solution from Microsoft.

    Applicability

    A. Applicable for all Microsoft Supported Countries where Cumulative Updates exist.

    B. Applicable for versions Microsoft Dynamics NAV 2013 and higher.

    Related Information

     

    The Microsoft Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    NAV Design Pattern - Implementation of Surrogate Keys using the AutoIncrement Pattern

    • 3 Comments

    This week's pattern describes how to link tables in a generic way, so that satellite tables (such as a comment table) can be linked to multiple different master tables, each having its unique related comment lines. You can find all published patterns on the Dynamics Community Wiki site. 

    Meet the Pattern

    This Pattern is meant to create generic & reusable links between tables. The goal is to have an easy generic way to link a generically designed sub table to a record on a main table which can be used for other links too.

    To minimize the impact of customizations and to keep modules as generic and reusable as possible the idea of the Unique Record Identifier is:

    • To create a generic and reusable link on a main table with minimum impact on the table.
    • To create generic and reusable sub tables that effortless can be reused anywhere in the application.

    Know the Pattern 

    Over years of development many things are repeated across different implementation and even inside the same application. A typical example could be adding comments to an area just as it is done in Microsoft Dynamics NAV multiple times. There can be reasons for doing this again and again, but not only does this need to be maintained and upgraded over the years, but all the implementations of comments also needs to be tested separately. If a standard and generic comment could be developed and a generic way of connecting it to a main table this could resolved. This is exactly what this pattern will resolve.

    The following diagram shows the table structure for linking a Document Header and Line Table with a Document Comment Table.

    The following diagram shows the table structure for linking a Master Data Table with a Master Data Comment Table.

    A typical way of linking a table to master data or to a document has been to use the primary key of the table being linked to. This causes some issues as the linked table now is designed specifically for the main table and cannot be reused. In case of renames the linked table needs to be renamed too which is costly in processing. Code also needs to be added on the delete trigger of the table to ensure that the attached records get removed if needed. The following diagram shows a generic way of creating a Comment table and linking it in a generic way to the main table no matter what this table might be. The Unique Record Identifier on the main tables is an Integer with AutoIncrement set to Yes.

     

    It is recommended using this pattern in all tables which need sub tables unless specific reasons exists for not doing this.

    Use the Pattern

    Step 1: Create a generic Unique Record Identifier in the main table

    The pattern is implemented by adding a field called Unique Record Identifier in a table (Main Table) where links are needed to be established to. Set the Property Data Type to Integer, Editable to No & AutoIncrement to Yes.

    Step 2: Create a generic linkable subtable.

    Read more about the Unique Record Identifier on NAV Wiki...

     

    Best regards,

    Soren Klemmensen

    The NAV Patterns team

  • Microsoft Dynamics NAV Team Blog

    Merging Application Objects using Windows PowerShell

    • 8 Comments

    Upgrading a Microsoft Dynamics NAV solution is time consuming. You have to identify which changes you have to make, you have to upgrade the application objects and the application code, and you might have to move the existing data around so that it fits the new database schema. In Microsoft Dynamics NAV 2013 R2, we started delivering Windows PowerShell cmdlets and sample scripts that can help you automate different parts of the upgrade process. In the latest cumulative update, we introduce a new set of Windows PowerShell cmdlets that can help you through the code upgrade.

    You can use the new cmdlets to modify application object source files in the Microsoft Dynamics NAV 2013 R2 Development Shell, or by importing the Microsoft.Dynamics.NAV.Model.Tools.psd1 module into the Windows PowerShell Integrated Scripting Environment (ISE). The new application merge utilities install when you choose the Developer option in Microsoft Dynamics NAV 2013 R2 Cumulative Update 9 Setup, or if you add the development environment to another installation option.

    The application merge utilities include the following Windows PowerShell cmdlets:

    Name

    Description

    Merge-NAVApplicationObject

    Compares the changes that have been made between two sets of Microsoft Dynamics NAV application objects, and applies the difference to a third set of application objects. The result of the merge is a number of text files with the merged application objects. Any conflicts that the cmdlet cannot merge are identified in conflict files.

    Compare-NAVApplicationObject

    Compares text files that contain Microsoft Dynamics NAV application objects, and then calculates the delta between the two versions. The result of the comparison is a number of text files with the calculated delta.

    Update-NAVApplicationObject

    Applies a set of deltas to the specified application objects. The files that describe the delta are generated by the Compare-NAVApplicationObject cmdlet.

    Join-NAVApplicationObjectFile

    Combines multiple application object files into one text file

    Split-NAVApplicationObjectFile

    Splits a text file that contains two or more application objects into separate text files for each application object.

    Get-NAVApplicationObjectProperty

    Gets Microsoft Dynamics NAV application object properties from the specified application object text files.

    Set-NAVApplicationObjectProperty

    Sets Microsoft Dynamics NAV application object properties in the specified application object text files.

    Getting started

    You will be able to read more about the cmdlets and how to use them in the MSDN Library after the release of Microsoft Dynamics NAV ‘Crete’, but for now, you can also type Get-Help "NAV" in the Windows PowerShell ISE the Microsoft Dynamics NAV Development Shell.

    If you don’t want to use the Microsoft Dynamics NAV Development Shell, use the Windows PowerShell ISE. But before you can access the cmdlets, you must import the Microsoft.Dynamics.Nav.Model.Tools.psd1 module. Here is an example of the command you can type:

    Import-Module "${env:ProgramFiles(x86)}\Microsoft Dynamics NAV\71\RoleTailored Client\Microsoft.Dynamics.Nav.Model.Tools.psd1" -force

    Get-Help "NAV"

    Now you can see the Help for the cmdlets and take a closer look at the examples for how to use them. You can also see detailed Help for each cmdlet by typing the following command:

    Get-Help cmdletname -detailed

    And you can concentrate on the examples by typing the following command:

    Get-Help cmdletname -examples

    For all of the new cmdlets, the starting point is 3 versions of application objects that you want to merge. The following table describes the three versions of the Microsoft Dynamics NAV application that you want to compare and merge.

    Version

    Description

    ORIGINAL

    The baseline of the application merge. For example, the Microsoft release of MicrosoftDynamics NAV 2013 R2.

    MODIFIED

    The updated version of the original. For example, this can be Microsoft Dynamics NAV 2013 R2 Cumulative Update 9. Alternatively, it can be a small add-on.

    In many cases, the modified application is the version that contains fewer changes to the original than the version that is the target of the merge. This is because you want to apply fewer changes to a large application rather than applying a large change to a small application.

    TARGET

    The version of the application that you want to apply the difference between the original and the modified application to. For example, this can be your solution that you want to apply a cumulative update to. Alternatively, it can be a new major release from Microsoft that you want to apply your modified solution to.

    Each of these versions can be any version that you want to do a three-way merge between. ORIGINAL can be your add-on, MODIFIED can be a customization of your add-on, and TARGET can be a new release of Microsoft Dynamics NAV from Microsoft. But for the purposes of this blog post, we'll keep the definitions as described in the table above.

    As input to the cmdlets, you can provide a text file, a list of text files, or a folder with text files. So you need to export the relevant application objects as text files. Optionally, you can use the development environment command ExportObjects. You can export each application object to a separate text file, or you can export all objects to a single text file. Optionally, you can use the Join-NAVApplicationObjectFile and Split-NAVApplicationObjectFile cmdlets to structure the text files in the way that works better for you. Also, depending on your scenario, you can work with a subset of your application, such as all codeunits, objects within an ID range, or a specific group of objects. Use the tools to get the text files that you need, and take a look at the sample scripts for inspiration.

    The Windows PowerShell sample scripts are available in the attached compressed archive. Start by opening the HowTo-Start-Import-NAV-Module.ps1 script in the Windows PowerShell ISE, navigate the command prompt to the folder where you placed the samples, and then run the script. Then open one of the other scripts, such as HowTo-Merge-1-General.ps1, and follow the guidance in the script.

    The sample script package includes a folder with four subfolders that can help you get started with the scripts. The demonstration data in the ORIGINAL, MODIFIED, and TARGET folders illustrate the text files that are the input to the cmdlets. For clarity, we have chosen to have one application object in each file, but you can use the Join-NAVApplicationObjectFile cmdlet to combine all the text files in the MODIFIED folder in a single file, for example, before you run the script. That way you can see how the Merge-NAVApplicationObject cmdlet identifies the application objects in the combined text file. We find it easier to work with one object in each file, but the cmdlets are there so you can configure the text files in the way that works better for you.

    We suggest that you open each of the sample scripts in the Windows PowerShell IDE and read through them to get acquainted with the new cmdlets. Then, set up a small test environment of your own where you can safely use the cmdlets on your own application objects to upgrade your solution to Microsoft Dynamics NAV 2013 R2 Cumulative Update 9.

    For more information, see the Merge Application Object Source Files whitepaper, which you can download from the blog post that announced the availability of Cumulative Update 9 here: http://go.microsoft.com/fwlink/?LinkId=403646.

Page 1 of 44 (650 items) 12345»