July, 2014

  • 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.

  • Microsoft Dynamics NAV Team Blog

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

    • 10 Comments

    Cumulative update 9 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 (New)
    • 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

    This cumulative update also introduces new application merge utilities: A new set of Windows PowerShell cmdlets that can help you through 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 Integration Script 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.

    For more information, see the MicrosoftDynamicsNAV2013R2CU9_MergeApplicationObjectSourceFiles.pdf whitepaper, which is attached to this blog post. We will also write about the new cmdlets here on the blog.

    Where to find cumulative update 9

    You can download cumulative update 9 from KB 2977473 – Cumulative Update 9 for Microsoft Dynamics NAV 2013 R2 (Build 37221).

    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:

    PartnerSource

    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

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

  • Microsoft Dynamics NAV Team Blog

    Cumulative Update 16 for Microsoft Dynamics NAV 2013 has been released

    • 3 Comments

    Cumulative update 16 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 16

    You can download cumulative update 16 from KB 2977472 – Cumulative Update 16 for Microsoft Dynamics NAV 2013 (Build 37201).

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

    CustomerSource:

    PartnerSource:

    More Information

    For more information about cumulative updates for Microsoft Dynamics NAV 2013, see Released Cumulative Updates for Microsoft Dynamics NAV 2013.

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

  • Microsoft Dynamics NAV Team Blog

    Synchronize metadata, please…

    • 6 Comments

    One of new procedures/functions we have in NAV 2013 R2 is “metadata synchronization”. It is process when object (table) description done in C\SIDE by NAV developer is applied to SQL object (object structure in SQL becomes the same as we have in NAV object designer).

    It is described at http://blogs.msdn.com/b/nav/archive/2014/03/27/table-synchronization-paradigm-in-microsoft-dynamics-nav-2013-r2.aspx

    Unfortunately synchronization step is not mentioned in some place, for example:
    - after you convert database to NAV 2013 R2, just after you have opened database with NAV 2013 R2 C\SIDE client and received message “database conversion was successful”  - run metadata synchronization;
    - after you have created new database – run metadata synchronization
    - in any case whatever you have done with objects – please run synchronization…

    About synchronization process in details you can read at https://mbs.microsoft.com/files/partner/NAV/Support/HotTopics/SynchronizingSchemachangesNAV2013R2.docx 

    But rough description could be: in NAV we have 3 “parts” of the same object: SQL object, Object description in Metadata snapshot, Object description in Object metadata.
    When synchronization runs, NAV compares object description in metadata snapshot and object metadata and if differences found then NAV tries to apply object description from object metadata to SQL object to make it as we see it objects designer in C\SIDE. When this is done, NAV updates object description in metadata snapshot and we have all 3 parts identical. So there must be no situation when SQL objects is not the same as object description in metadata snapshot.
    To find theses inconsistency we have released NAV 2013 R2 database consistency checker tool” which checks database metadata vs database structure and reports any inconsistency which could be fixed directly in SQL. Mentioned tool is released under KB 2963997 and could be downloaded from hotfix site.

    Metadata synchronization process is running by NAV Service Tier (NST) and it starts when
    - any client (RTC, Web client, Web service) connect to NST
    - or executed NAV Administration PowerShell cmdlet “Sync-NAVTenant”
    - or user imports objects to object designer and option “Prevent data loss from table changes” is set to “Yes”.

    Usually synchronization is fast process: we run RTC, connect to NST, synchronization starts and finishes and RTC loads.

    However when we do “big changes” (added fields to table and few keys…) or have big databases, synchronization runs hours. I have cases where synchronization runs >3 hours and here comes problem: process runs in background, users are not aware about it and whatever they tries to do with db, they receives different errors (about channel failure; SQL timeout, service not responsive and etc.). Even worse user can stop NST and with this kills synchronization and then SQL starts rollback for next few hours…

    When NAV shows that synchronization finished successfully (cmdlet finished) or NAV client shows error, it could be that SQL still continue to synchronize metadata in background (or rollback ). Run sp_who2 in SQL management studio to see if there are running/active processes where ProgramName is “Microsoft Dynamics NAV Service”. If there is not “sleeping” process and it’s DiskIO increase continuously, please wait and do nothing with NAV (don’t modify any object, don’t compile, don’t import – better close development environment at all). At some moment processes becomes “sleeping” – this means synchronization finished (successful or failed you can see in Windows Event Viewer). Only after that you can continue your further actions.

    Our development team is preparing solutions which make metadata synchronization more transparent and user friendly, so we expect easier life soon, but now: Synchronize metadata and track synchronization, please…  

      

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

    Gedas Busniauskas
    Microsoft Lithuania
    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Introducing the Microsoft Dynamics NAV Application Profiler

    • 4 Comments

    Did you ever wish you could monitor how your application code performs at real time? We have produced a sample and a video that can help you get started with C/AL tracing and application performance profiling.

    Get the Microsoft Dynamics NAV Application Profiler here, http://go.microsoft.com/fwlink/?LinkId=403898, and watch the video on how to install, configure and use this tool to enable C/AL code tracing and determine application performance during code execution here, http://go.microsoft.com/fwlink/?LinkId=403897.

     

    David Worthington and Dmytro Sitnik from the Dynamics NAV team

    Format: ???
    Duration: 7:00

Page 1 of 1 (8 items)