• Microsoft Dynamics NAV Team Blog

    Announcing Microsoft Dynamics NAV 2013 R2 Cumulative Update 1

    • 16 Comments

    We are happy to announce that the Cash Management team has shipped Microsoft Dynamics NAV 2013 R2 Cumulative Update 1. The cumulative update is available for download on PartnerSource/CustomerSource.

    The cumulative update is an application update only. It mainly contains Cash Management features, such as:

    • UI for the Data Exchange Framework
    • Import of SEPA CAMT bank statements in W1 (all countries can use it) and in NL and BE in integration with existing localizations
    • SEPA Direct Debit in FR, IT, ES, BE, and CH in integration with existing localizations

    As a new service, Microsoft Dynamics NAV 2013 R2 Cumulative Update 1 contains the "CU1Help" folder with selected topics for W1 and six country versions that have changed since Microsoft Dynamics NAV 2013 R2. The Help content is in English language only.

    For more information about features in the cumulative update, see What’s New in Microsoft Dynamics 2013 R2 Cumulative Update 1, which is available from the download page or the country-specific What's New topics in the "CU1Help" folder.

    To learn about known issues, of which the first has a prerequisite hotfix, see Release Notes for Microsoft Dynamics 2013 R2 Cumulative Update 1, which is available from the download page.

    To follow installation steps and steps required to use the Data Exchange Framework and to update Help, see How to Update to Microsoft Dynamics 2013 R2 Cumulative Update 1, which is available from the download page. 

    To help customers and partners get an overview of SEPA functionality released in different countries during the calendar year 2013, we have released the “SEPA Functionality in Microsoft Dynamics NAV” white paper on the Getting Ready site for Microsoft Dynamics NAV 2013 R2 on PartnerSource/CustomerSource.

    Note: The product downloads, Help download, and links to supporting documents are presented in a separate section for Microsoft Dynamics NAV 2013 R2 Cumulative Update 1 on the download page on PartnerSource/CustomerSource.

  • Microsoft Dynamics NAV Team Blog

    Upgrade Toolkit for Upgrading Data from Microsoft Dynamics NAV 2009 R2 and Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2013 R2

    • 48 Comments

    The components needed to upgrade data directly from Microsoft Dynamics NAV 2009 R2 to Microsoft Dynamics NAV 2013 R2 are now available for download.

    Download the upgrade toolkit from PartnerSource or from CustomerSource

    In order to use the toolkit to upgrade data from Microsoft Dynamics 2009 R2 or Microsoft Dynamics NAV 2009 SP1, you will also need the Microsoft Dynamics NAV 2013 development environment and Microsoft Dynamics NAV 2013 R2.

    At the Directions EMEA conference in Vienna and the Directions US conference in Nashville, we said that we have a team that is focusing on the Microsoft Dynamics NAV upgrade story. Going through the big transformation from the classic stack to the new product architecture in Microsoft Dynamics NAV 2009 was not easy and is challenging many customers and partners. So for our team, it is essential that the final outcome of our work is that each upgrade is easier, requires significantly less effort, and that it does not disrupt the daily business for our customers.

    In Microsoft Dynamics NAV 2013 R2, we introduced support for converting a Microsoft Dynamics NAV 2013 database so that you can run an application that was created in Microsoft Dynamics NAV 2013 on the Microsoft Dynamics NAV 2013 R2 platform, also known as a technical upgrade.

    Note: We strongly recommend that you upgrade the application objects as well so that your solution includes the important application fixes and new functionality that is introduced in Microsoft Dynamics NAV 2013 R2.

    Secondly, you can fully automate the data upgrade process using the Windows PowerShell scripts that we included in the Microsoft Dynamics NAV 2013 R2 product media. Historically, this process has been known for its tediousness and high risk of human error when multiple operations had to be executed consecutively in all companies of the database that you were upgrading. The scripts automate this work so that you can test and execute your data upgrades more reliably.

    Now with this delivery, we introduce an upgrade toolkit for upgrading the data from Microsoft Dynamics NAV 2009 R2 to Microsoft Dynamics NAV 2013 R2. This significantly simplifies the upgrade process for those of you coming from Microsoft Dynamics NAV 2009 R2 – or Microsoft Dynamics NAV 2009 SP1.

    Included in the new upgrade toolkit are all known data upgrade-related application hotfixes that we are aware of, and we also addressed several platform issues that affected the upgrade scenario.

    Note: You must download the latest Microsoft Dynamics NAV platform hotfixes before you start using the upgrade toolkit. The required hotfixes for Microsoft Dynamics NAV 2013 are available in the latest hotfix rollup, which you can download from PartnerSource or CustomerSource. For Microsoft Dynamics NAV 2013 R2, you can download the required hotfixes from PartnerSource or CustomerSource.

    When you download the new upgrade toolkit from the link above, you can use it to simply your upgrade process. Here are the main steps in upgrading from Microsoft Dynamics NAV 2009 R2 (or Microsoft Dynamics NAV 2009 SP1) by using the new upgrade toolkit.

    Note

    Before you start, make sure that you use the latest platform binaries for all versions of Microsoft Dynamics NAV in this process. For more information, see the following pages for the latest updates to the versions of Microsoft Dynamics NAV:

    Microsoft Dynamics NAV 2009 R2: Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2009 SP1 and Microsoft Dynamics NAV 2009 R2.

    Microsoft Dynamics NAV 2013: Released Cumulative Updates for Microsoft Dynamics NAV 2013.

    Microsoft Dynamics NAV 2013 R2: Released Cumulative Updates for Microsoft Dynamics NAV 2013 R2.

    To upgrade data from a Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 database

    1. In the Microsoft Dynamics NAV  2009 R2 or Microsoft Dynamics NAV  2009 SP1 development environment (Classic client):
      1. Make sure that all table objects have compiled successfully. During compilation, Microsoft Dynamics NAV generates or regenerates the BLOB content in the Object Metadata table that is used in the later steps.  In the Tools menu, choose Build Server Application Objects.
        Note: You must also do this if you upgrade from Microsoft Dynamics NAV 2013 to Microsoft Dynamics NAV 2013 R2 . All tables must be compiled Microsoft Dynamics in NAV 2013 before you start upgrading to Microsoft Dynamics NAV 2013 R2.
      2. Create a copy or a backup of your old Microsoft Dynamics NAV 2009 R2 database, and open it in the Microsoft Dynamics NAV 2009 R2 development environment.
      3. Add your partner license to the database.
        You can do this by selecting the Save License in Database field in the Alter Database window. If the field was not already selected, a dialog box opens so you can specify the location of your partner license.
        If the field was already selected, upload the partner license from the License Information window.
      4. Open the Object Designer, and then import Upgrade601701.1.fob. If the .fob file contains objects with conflicting versions that are already in the database, the Import Worksheet window opens. Choose Replace All.
      5. For each company in the database, open the company, and make the relevant changes to data. For more information, see Task 3: Data/Object Changes Prior to Step 1 in the MSDN Library.
    2. Then, from the Object Designer, run form 104001, Upgrade - Old Version. Choose the Transfer Data button. Repeat this action for each company in the database. 
      Note
      We strongly recommend that you back up the database using SQL Server management tools after this step. 
    3. When you have transferred all data for all companies, in the Upgrade - Old Version window, choose the Delete Objects button.
      This action deletes all objects in the database that are not tables, but also obsolete tables that belong to functionality that is not available in Microsoft Dynamics NAV 2013 R2.
    4. Uninstall Microsoft Dynamics NAV 2009 R2, and then install Microsoft Dynamics NAV 2013.
      Note
      You do not have to install the full Microsoft Dynamics NAV 2013 product to perform the following database conversion. Instead, you can create a folder with the following files from the Microsoft Dynamics NAV 2013 product media:
      • Finsql.exe
      • Fin.stx
      • Fin.etx
      • CRONUS.FLF
      • Ndbcs.dll

      You can then use the Finsql.exe file to perform the conversion.  

    5. Change the compatibility level of your database. For SQL Server 2008 and SQL Server 2008 R2, verify that the compatibility level of the database is set to 100. For SQL Server 2012, set the compatibility level to 110.
    6. In the Microsoft Dynamics NAV 2013 development environment, open the Microsoft Dynamics NAV 2009 R2 database and agree to convert the database. The database has now been technically upgraded to Microsoft Dynamics NAV 2013.

      Note 
      During this step, Microsoft Dynamics NAV converts all text and code fields to Unicode format by changing their SQL Server data type. This conversion requires more disk space than usual, since both the database and the log file will grow in size considerably. It can also be a lengthy process.

      If your Microsoft Dynamics NAV 2009 R2 database is using SQL Server Collation, within the same step the collation will be changed to a suitable Windows collation. This is because Microsoft Dynamics NAV 2013 and higher versions only support Windows Collation. If you converted your database using the RTM version of Microsoft Dynamics NAV 2013, you may be experiencing collation-related issues after this conversion. Therefore it is strongly recommended to use the latest available version of Microsoft Dynamics NAV 2013 development environment to perform this step.

      Note
      We strongly recommend that you take a full SQL Server backup at this stage when the database conversion has completed.

    7. Uninstall Microsoft Dynamics NAV 2013, and then install Microsoft Dynamics NAV 2013 R2.
    8. In the Microsoft Dynamics NAV 2013 R2 development environment:
      1. Open the Microsoft Dynamics NAV 2013 database and agree to convert the database.
      2. Compile the system tables. You can find the tables by setting a filter for table ID 2000000004..2000000130.
        In the following step, you will be connecting a Microsoft Dynamics NAV Server instance to the database. 
    9. Make sure that the service account that the Microsoft Dynamics NAV Server instance uses has the db_owner role for the database. 

      Note 
      If you are upgrading a large database, such as a database size of more than 20-25 GB, make sure that you increase the timeout value in the Microsoft Dynamics NAV Server configuration file. In the CustomSettings.config file, the value is defined in the SQL Command Timeout node. The default value is 10 minutes, which is sufficient in the normal day-to-day work. However, during an upgrade that can take several hours depending on the size of the tables, you must increase the timeout period.

    10. Connect the Microsoft Dynamics NAV Server instance to the database, and then start the service instance.
    11. In the Microsoft Dynamics NAV 2013 R2 development environment:
      1. On the Tools menu, open Options, and then, make sure that the Prevent data loss from table changes field is set to Yes.You must also make sure that the Server Name, Server Instance, and Server Port fields are filled in.
        This ensures that the Microsoft Dynamics NAV Server instance that is connected to the database will verify that no operation will cause loss of data in the development environment.
      2. Import all customized objects in .fob format into the upgraded database. If the .fob file contains objects with conflicting versions that are already in the database, the Import Worksheet window opens. Choose Replace All.
      3. Make sure all objects are compiled.

        Important
        It is very important that at least all table objects have successfully compiled before you proceed.

      4. Import Upgrade Step 2 objects from the Upgrade601701.2.fob file.If the .fob file contains objects with conflicting versions that are already in the database, the Import Worksheet window opens. Choose Replace All.
    12. Perform the database schema synchronization by running the Sync-NAVTenant Windows PowerShell cmdlet in the Microsoft Dynamics NAV 2013 R2 Administration Shell (run as administrator).

      Note
      When you upgrade from one version to another, this typically involves numerous changes in the structure of the Microsoft Dynamics NAV tables (the object metadata). Database synchronization ensures that these changes in the metadata are applied to the corresponding tables in SQL Server. For example, it changes columns dimensions and data types, drops and create indices, drops and creates indexed views (V-SIFT), creates new tables, columns, and so on.

      When the number of changes is high, such as comparing Microsoft Dynamics NAV 2009 R2 to Microsoft Dynamics NAV 2013 R2, this synchronization can become a lengthy and resource consuming task.

      Database synchronization is triggered upon any request to Microsoft Dynamics NAV Server, such as when you start a client or run a windows Powershell cmdlet. Microsoft Dynamics NAV Server checks if metadata has changed since the last synchronization by comparing the content of the Object Metadata and Object Metadata Snapshot system tables. If a change is found, the synchronization procedure is initiated.  

      When the synchronization process has started, it is essential that you wait for it to complete or rollback (in case of an error or time-out). If you’re running a client, do not confirm or click anything client side. If you’re running the Sync-NAVTenant cmdlet, wait for it to complete and return control to the Windows PowerShell command prompt.

      Do NOT stop the Microsoft Dynamics NAV Server service at this point since there are high chances that the database synchronization transaction is still running.

      1. Run Microsoft Dynamics NAV 2013 R2 Administration Shell as Administrator. This opens a PowerShell prompt where the Microsoft Dynamics NAV cmdlets are available.

      2. Run the synchronization command against your upgrade database as follows: 

        Sync-NAVTenant –ServerInstance <MyNAVServerInstance> 

      3. Wait until the cmdlet returns control to the Windows PowerShell window.

    13. Open the Microsoft Dynamics NAV 2013 R2 Windows client to verify that you are connected to the Microsoft Dynamics NAV Server instance that is connected to the database being upgraded. 
      Next, you will run Upgrade Step 2 in each company in the upgraded database. You can get a list of all existing companies in the database by running the Get-NAVCompany cmdlet and passing as an argument the Microsoft Dynamics NAV Server instance which is connected to the upgraded database. 
      You will run objects directly from the development environment, so you must specify the company that the objects must run in in the Options window.
    14. In the Microsoft Dynamics NAV 2013 R2 development environment:
      1. On the Tools menu, open Options, and then, in the Company field, specify the name of the first company.
      2. In the Object Designer, find page 104002 Upgrade - New Version, and then choose Run.
      3. In the Upgrade - New Version window, choose Test Database Connection to make sure that the C/AL code that is triggered by the actions on the page has access to the database.
        If your database is on a named SQL Server instance, you must specify the full name in the SQL Server Name field.  
      4. Choose Transfer Data.
        If the process is successful, and you don't have to revisit the upgrade logs, you can clean the content of the Upgrade Time Log  table. 
      5. On the Navigate tab, choose Time Log, and then, in the Upgrade Time Log page, delete all records.
      6. Close the Upgrade - New Version window, and then close the Microsoft Dynamics NAV Windows client.
    15. Repeat step 14 for each remaining company in the database.
    16. When you have successfully transferred data in the last company, you must upgrade data that is common to all companies in the database, such as permissions, permission sets, web services, profiles and control add-ins.
    17. Upgrade data common to all companies such as permissions, permission sets, web services, profiles and control add-ins.
      If the customer has changed the Read/Write/Modify/Delete/Execute settings for any of the standard permissions, or customized default permission sets in any way, you must merge these changes into the default permissions sets and permissions that are included in Microsoft Dynamics NAV 2013 R2. You can use XMLport 104001 Import/Export Roles and XMLport 104002 Import/Export Permissions to export the new default roles and permissions from the CRONUS International Ltd. demonstration database in Microsoft Dynamics NAV 2013 R2. You can add control add-ins in the Control Add-ins window in the Microsoft Dynamics NAV Windows client. For more information, see How to: Register a Windows Client Control Add-in. For example, the following client control add-ins are available from the Microsoft Dynamics NAV 2013 R2 product media:
      • Microsoft.Dynamics.Nav.Client.BusinessChart
      • Microsoft.Dynamics.Nav.Client.PageReady
      • Microsoft.Dynamics.Nav.Client.PingPong
      • Microsoft.Dynamics.Nav.Client.VideoPlayer
    18. Delete the upgrade toolkit objects.
      1. In the Upgrade - New Version window, choose Mark/Delete Upgrade Toolkit.
        This deletes all upgrade toolkit objects, except tables
      2. In the Microsoft Dynamics NAV development environment, delete the upgrade tables by setting a field filter for objects where the Version List contains Upgrade Toolkit Table - marked for deletion.

    The database has now been through a data upgrade to Microsoft Dynamics NAV 2013 R2.

    Best regards,

    The Microsoft Dynamics NAV Service Experience team

    -----Blog post updated in May 2014-----

     

  • Microsoft Dynamics NAV Team Blog

    Commerce Gateway for Microsoft Dynamics NAV 2013

    • 0 Comments

    This is a follow up on the blog entry Coming soon – Commerce Gateway for Microsoft Dynamics NAV 2013.

    We have released a sample application which illustrates how a get a Commerce Gateway solution to work in Microsoft Dynamics NAV 2013. The same solution will apply to Microsoft Dynamics NAV 2013 R2.

    The sample shows how you should set up the connection between Microsoft BizTalk and Microsoft Dynamics NAV using a web service. To get the bits for the sample, request hotfix 2892792 from Microsoft Support.

    The KB contains the following:

    1. A whitepaper describing the required steps to get the solution to work on Microsoft Dynamics NAV 2013, including how to change the upgrade tool to keep the Commerce Gateway objects as well as suggested code changes to make all objects work. The whitepaper also includes a description on how to change the BizTalk setup.
    2. A .fob file with some of the objects to make the solution work. Please note that it is only a subset of the Commerce Gateway solution, mainly the communication objects. This includes a new code unit to be exposed as a web service.
    3. A Microsoft Excel sheet showing all objects that are relevant for Commerce Gateway as well as an identification of the objects that have changed.
    4. Please note: The solution still utilizes the Commerce Gateway Request Client and the Request Server in the Microsoft Dynamics NAV 2009 version, so the limitations for a 32 bit installation are still true.

    Rikke Lassen

    Senior Program Manager

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 2013 R2 PLLP Toolkit Released

    • 1 Comments

    The Microsoft Dynamics NAV 2013 R2 PLLP Toolkit is now available on PartnerSource. With the Partner Localization and Translation Licensing Program (PLLP) toolkit, you can create a localized version of Microsoft Dynamics NAV 2013 R2 and make this available in countries that are not supported directly by Microsoft. The toolkit includes tools and a whitepaper that wil help you translate platform resource files and build a country/region-specific installer.

    You can find the PLLP Toolkit on the Dynamics NAV 2013 R2 download page at this location: 

    https://mbs.microsoft.com/partnersource/support/selfsupport/productreleases/MSDNAV2013R2DownloadPage.htm

     

    Best regards,

    Michael Riddersholm Petersen 

    Microsoft Dynamics NAV 

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 2013 R2 Management Pack for System Center Released

    • 1 Comments

    We are excited to announce that we have released the Microsoft Dynamics NAV 2013 R2 Management Pack for System Center. You can find the Management Pack and guide on the Microsoft Download Center here: http://www.microsoft.com/en-in/download/details.aspx?id=36388. The guide walks you through the details of deploying, configuring and using the management pack.

    In this blog, we are focusing on describing the benefits of the management pack, as well as some of the internals of how it works, and how it is meant to be used.

    What is new in the Management Pack?

    The Microsoft Dynamics NAV 2013 R2 Management Pack for System  Center is built on top of the previous version. The new features include:

    • New rules that collect data on all Microsoft Dynamics NAV performance counters.
    • Two new monitors for Microsoft Dynamics NAV Server instances. One of the monitors checks certificates that protect communication for the different communication endpoints. The other monitor checks the health of the individual tenants that are mounted on the server instances.

    The new monitors are simple event-based monitors that use events that are logged by each server instance. Therefore, each server instance is responsible for notifying the management pack about its own health. For certificates, this functionality is built into the server, but for tenants the story is a little different.

    Monitoring tenants with the Task Scheduler

    Microsoft Dynamics NAV 2013 R2 does not have built in monitoring, but combined with the windows Task Scheduler, an administrator can create logic that can be used to determine tenants’ health. Rules can be created that detect issues, automatically perform recoveries, and ultimately notify an operations manager of issues if the recoveries are not successful.

    Notifying and alerting an operations manager is handled via events, so the management pack has a set of simple event monitors that are triggered based on these events. Events are logged to the Windows Application event log of the computer hosting the Microsoft Dynamics Server instances.

    An example

    The following is an example of a Task Scheduler task that can be used for monitoring whether all tenant databases are available.

    This tasks runs a Windows PowerShell script that contains the actual logic. The script runs every minute. The scripts must be run in elevated mode (as an Administrator) and created as a Microsoft Dynamics NAV user.

    <?xml version="1.0" encoding="UTF-16"?>

    <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">

      <RegistrationInfo>

        <Date>2013-09-25T11:13:51.6449819</Date>

        <Author>.\Administrator</Author>

        <Description>Test all tenant databases hosted by server instance running on the local machine.</Description>

      </RegistrationInfo>

      <Triggers>

        <TimeTrigger>

          <Repetition>

            <Interval>PT1M</Interval>

            <StopAtDurationEnd>false</StopAtDurationEnd>

          </Repetition>

          <StartBoundary>2013-10-01T11:04:09</StartBoundary>

          <Enabled>true</Enabled>

        </TimeTrigger>

      </Triggers>

      <Principals>

        <Principal id="Author">

          <UserId>.\Administrator</UserId>

          <LogonType>S4U</LogonType>

          <RunLevel>HighestAvailable</RunLevel>

        </Principal>

      </Principals>

      <Settings>

        <MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>

        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>

        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>

        <AllowHardTerminate>true</AllowHardTerminate>

        <StartWhenAvailable>true</StartWhenAvailable>

        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>

        <IdleSettings>

          <StopOnIdleEnd>true</StopOnIdleEnd>

          <RestartOnIdle>false</RestartOnIdle>

        </IdleSettings>

        <AllowStartOnDemand>true</AllowStartOnDemand>

        <Enabled>true</Enabled>

        <Hidden>false</Hidden>

        <RunOnlyIfIdle>false</RunOnlyIfIdle>

        <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>

        <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>

        <WakeToRun>false</WakeToRun>

        <ExecutionTimeLimit>PT1H</ExecutionTimeLimit>

        <Priority>7</Priority>

        <RestartOnFailure>

          <Interval>PT1M</Interval>

          <Count>2</Count>

        </RestartOnFailure>

      </Settings>

      <Actions Context="Author">

        <Exec>

          <Command>powershell</Command>

          <Arguments>.\Test-TenantDB.ps1</Arguments>

          <WorkingDirectory>C:\ScheduledMonitoring</WorkingDirectory>

        </Exec>

      </Actions>

    </Task>

    The task expects a working directory that is named C:\ScheduledMonitoring and contains the PowerShell script Test-TenantDB.ps1

    The script iterates through all the tenants hosted by all the local Microsoft Dynamics NAV Server instances, and invokes the OnRun function on Codeunit 1. The OnRun function contains no logic, so the invocation will just act as a ping, which detects whether the tenant database is available.

    The Invoke-NAVCodeunit script can be used for multiple purposes. It is very easy to use the following template to invoke random methods and execute real synthetic transactions that make sense in your environment.

    Test-TenantDB.ps1

    #--------------------------------------------------------------------------

    #     Copyright (c) Microsoft Corporation.  All rights reserved.

    #--------------------------------------------------------------------------

     

    if ((Get-PSSnapin -Registered "Microsoft.Dynamics.Nav.Management" -ErrorAction SilentlyContinue) -ne $null) {

        Add-PSSnapin "Microsoft.Dynamics.Nav.Management" }

     

    $errorVariable = $null

    $hasError = $false

     

    # test is all tenant databases can be accessed by the running server instance.

    Get-NAVServerInstance | where { $_.State -eq "Running" } | foreach {

        $serverInstance =  $_.ServerInstance

        Get-NAVTenant $serverInstance | foreach {

            # codeunit 1 will always exist

            Invoke-NAVCodeunit $ServerInstance -CodeunitId 1 -Tenant $_.Id -ErrorVariable $errorVariable -ErrorAction Continue

            if ($errorVariable -ne $null -and $errorVariable.Count -gt 0) { $hasError = $true }

        }

    }

     

    if ($hasError -eq $true) {

        # we can respond to this error level

        exit 1

    }

    Generating event log entries that will be escalated to SCOM

    There are two generic event log monitors in the management pack, one for server instances and one for mounted tenants. These monitors are described in detail in the Management Pack Guide for Microsoft Dynamics NAV 2013 R2. The communication with these monitors is rather simple when creating scheduled monitoring tasks. Basically, you can run any type of logic that matches your infrastructure and application, and then either rely on the server instance to create the proper events or create escalation events in your script.

    For a server instance named DynamicsNAV71, the format looks like this:

    # write a generic server instance event log entry that will be picked up by SCOM

    Write-EventLog -LogName 'Application' -Source “MicrosoftDynamicsNavServer$DynamicsNAV71” -EntryType Error -Message "Server instance: DynamicsNAV71 - <Here goes the actual error message, that you will send to the operations manager> " -EventId 911

    For tenants, the format differs slightly. If the server instance named DynamicsNAV71 hosts a tenant named default, then the format looks like this:

    # write a generic server instance event log entry that will be picked up by SCOM

    Write-EventLog -LogName 'Application' -Source “MicrosoftDynamicsNavServer$DynamicsNAV71” -EntryType Error -Message "Server instance: DynamicsNAV71 Tenant ID: default - <Here goes the actual error message, that you will send to the operations manager> " -EventId 911 

    The following PowerShell script, which monitors the TCP ports on all the endpoints, shows how to use the manually generated event log entries to communicate with SCOM.

    Test-TcpPortState.ps1

    #--------------------------------------------------------------------------

    #     Copyright (c) Microsoft Corporation.  All rights reserved.

    #--------------------------------------------------------------------------

     

    if ((Get-PSSnapin -Registered "Microsoft.Dynamics.Nav.Management" -ErrorAction SilentlyContinue) -ne $null) {

        Add-PSSnapin "Microsoft.Dynamics.Nav.Management" }

     

    $hasError = $false

     

    # call netstat to retrieve the status of the tcp ports on the local machine

    Function Get-TcpPortState

    {

    param(

     

               [Parameter(Position=0,ValueFromPipeline=$true)]

               [System.Int32]$Port='0'

               )

    process

               {

               netstat -ano | select-string -Pattern '\s+(TCP)' | foreach {

     

                       $item = $_.line.split(' ',[System.StringSplitOptions]::RemoveEmptyEntries)

     

                       if($item[1] -notmatch '^\[::' -and $item[1].split(':')[-1] -like $Port)

     {

              

                           New-Object -TypeName PSObject -Property @{State = $item[3]} | select -Property 'State'

     }

                          }

               }

    }

     

    # check the port status for all server instance endpoints

    Get-NAVServerInstance | where { $_.State -eq "Running" } | foreach {

        $serverInstanceFull =  $_.ServerInstance

        (Get-NAVServerConfiguration $serverInstanceFull) |  where { $_.key -like '*Port'} | foreach {

            $serverInstanceShort = $serverInstanceFull.Split('$')[1]

            $portName = $_.key

            $port = $_.value

            $state = (Get-TcpPortState $port).State

            if($state -eq $null -or $state -ne 'LISTENING')

            {

                # write an generic event log entry, that will be picked up by SCOM

                Write-EventLog -LogName 'Application' -Source $serverInstanceFull -EntryType Error -Message "Server instance: $serverInstanceShort - is not listening on $portName=$port" -EventId 911

                $hasError = $true

            }

        }

    }

     

    if ($hasError -eq $true) {

        # we can respond to this error level

        exit 1

    }

     

    Best regards,

    Stefan Omdahl & John Swymer

  • Microsoft Dynamics NAV Team Blog

    NAV Design Patterns: Your project now!

    • 0 Comments

    As the design patterns hit the NAV C/AL developers world, they've got quite a reaction from the community:

    "We've also tried this in our company, but it worked | didn't work"
    "Have you ever thought of... ?"
    "This pattern would be better if ..."
    "I have a few examples of patterns that we use and work..."
    "We've upgraded much faster by implementing this new pattern ..." (this one is my favorite... and soon to come)

    Wouldn't it be awesome, if any C/AL developer who has something to say, could comment, edit or add new NAV Design Patterns?

    To open this to the community, we've added a NAV Design Patterns Wiki on the Dynamics Community webpage. What you'll find there:

    • The patterns published so far on the blog
    • New patterns! from our latest release. Explaining the MiniApp. Explaining new paradigms we used for better error handling, for localisations, for better user experiences
    • The possibility to comment (yes, we update the patterns if the comments are good)
    • The chance to be an author and to get credit on it. See how.

    As promised at NAV Tech Days 2013, to make it easy for you to write a pattern, find here the template that we've used, explained.

    And this is the teaser for our latest pattern:

    Easy Update of Setup or Supplementary Information

    By Anders Larsen at Microsoft Development Center Copenhagen

    Meet the Pattern

    Users or the administrator must regularly update setup or supplementary information in the day-to-day business, such as setting up a new type of customer. This setup task often arrives when their focus is on registration and execution instead of setup.

    The navigation experience around these extra steps is often quite troublesome and time-consuming. To enable users to easily perform the needed update, a guide often gives the best support.

    To guide users, we can prompt them with a dialog on which they can update the setup or supplementary information instantly and easily, so that they can proceed with the business task without being side-tracked. 

    Continue reading on NAV Patterns Wiki..

    Hoping this work will bring value to you,

    The NAV Design Patterns team

  • Microsoft Dynamics NAV Team Blog

    Creating URLs to Microsoft Dynamics NAV Clients

    • 7 Comments

    The URL builder function, GETURL, is released in Microsoft Dynamics NAV 2013 R2 to reduce coding time for developers who need to create various URL strings to run application objects in either the win client, the web client, or on web services. In addition, the GETURL function makes multitenancy features more transparent to C/AL developers.

    Details

    Ever had to construct win client URLs like the one below?

    dynamicsnav://myserver:7046/myInstance/myCompany/runpage?page=26

    Today, Microsoft Dynamics NAV also provides a web client. This means that you must update your code to construct web client URLs too. What about multitenancy? The URL Builder should know if it is running in a multitenant setup and it should know how to choose the right tenant. What about maintaining this code?

    The good news is that GETURL has been introduced to handle all URL building for you.

    GETURL automatically handles:

    • Multitenancy
    • Correct URL format for each client
    • Publicly accessible hostnames.

    Usage

    The format is:

    [String :=] GETURL(ClientType[, Company][, Object Type][, Object Id][, Record])

    Where:

    • Client Type can be: Current, Default, Windows, Web, SOAP, or OData. This enables a range of scenarios for the C/AL developer, such as moving to the web client without changing code to decide where the URL should point to. This is done either by setting Client Type to Current, and just ensuring that web is used to invoke the link creation, or by setting Client Type to Default and changing its value to Web when it is ready to move to the web platform.
    • Object Type and Object ID define the type of the application object to run (Table, Page, Report, Codeunit, Query, or XMLport) and its ID.
    • Record specifies the actual data to run the URL on, such as:

    Vendor.GET("Account No.");

    GETURL(CLIENTTYPE:WEB,COMPANYNAME, OBJECTTYPE::Page,27,Vendor)

    Note: It is currently not possible to set filters on the record that you sent as a last parameter to the GETURL function. However, it is possible to write your own code to compute and append the filter string to the URL that is created by the GETURL function.

    The server name and instance are extracted automatically by GETURL and do not need to be specified by the C/AL developer. Furthermore, the multitenancy setup is transparent to the C/AL developer. No multitenancy parameters are specified when you call GETURL, because the function knows from the server setup if it is running in a multitenant environment and if so, it will add a string like "&tenant=MyTenant" to the URL.

    When to Use

    The GETURL function can generally be used every time a URL must be created. The following are some scenarios where the function is particularly useful.

    • Document approvals. For more information, see the “NAV Usage Example” section.
    • Reports containing drill-down links. (Beware of the resource cost of adding a new URL element to the Report dataset.)
    • When planning to write code for, or migrate to, various display targets (Microsoft Dynamics NAV Windows client, Microsoft Dynamics NAV web client, Microsoft Dynamics NAV web services) without having to explicitly specify which client to use.

    Examples of Usage

    The following are examples of calls to GETURL and their corresponding return value:

    Command

    URL

    GETURL(CLIENTTYPE::Win)

    dynamicsnav://MyServer:7046/DynamicsNAV71//

    GETURL(CLIENTTYPE::Web)

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient

    GETURL(CLIENTTYPE::OData)

    http://MyServer:7048/DynamicsNAV71/OData

    GETURL(CLIENTTYPE::SOAP)

    http://MyServer:7047/DynamicsNAV71/WS/Services

    GETURL(CLIENTTYPE::Current) ie. When running this code on a Win client session

    dynamicsnav://MyServer:7046/DynamicsNAV71//

    GETURL(CLIENTTYPE::Default) ie. When the Server config key DefaultClient is set to Windows

    dynamicsnav://MyServer:7046/DynamicsNAV71//

    GETURL(CLIENTTYPE::Windows,COMPANYNAME)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/

    GETURL(CLIENTTYPE::Windows,'')

    dynamicsnav://MyServer:7046/DynamicsNAV71//

    GETURL(CLIENTTYPE::Windows,'NONEXISTING Corp')

    dynamicsnav://MyServer:7046/DynamicsNAV71/NONEXISTING Corp/

    GETURL(CLIENTTYPE::Web,COMPANYNAME)

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient?company=CRONUS

    GETURL(CLIENTTYPE::Web,'')

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient

    GETURL(CLIENTTYPE::Web,'NONEXISTING Corp')

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient?company=NONEXISTING Corp

    GETURL(CLIENTTYPE::OData,COMPANYNAME)

    http://MyServer:7048/DynamicsNAV71/OData/Company('CRONUS')

    GETURL(CLIENTTYPE::OData,'')

    http://MyServer:7048/DynamicsNAV71/OData

    GETURL(CLIENTTYPE::OData,'NONEXISTING Corp')

    http://MyServer:7048/DynamicsNAV71/OData/Company('NONEXISTING Corp')

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME)

    http://MyServer:7047/DynamicsNAV71/WS/CRONUS/Services

    GETURL(CLIENTTYPE::SOAP,'')

    http://MyServer:7047/DynamicsNAV71/WS/Services

    GETURL(CLIENTTYPE::SOAP,'NONEXISTING Corp')

    http://MyServer:7047/DynamicsNAV71/WS/NONEXISTING Corp/Services

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Table,27)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runtable?table=27

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Page,27)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runpage?page=27

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Report,6)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runreport?report=6

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Codeunit,5065)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runcodeunit?codeunit=5065

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Query,9150)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runquery?query=9150

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::XmlPort,5150)

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runxmlport?xmlport=5150

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Page,27) ie. When the Web Service is published

    http://MyServer:7048/DynamicsNAV71/OData/Company('CRONUS')/PAG27Vendors

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Query,9150)  ie. When the Web Service is published

    http://MyServer:7048/DynamicsNAV71/OData/Company('CRONUS')/QUE9150MyCustomers

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Page,27)  ie. When the Web Service is published

    http://MyServer:7047/DynamicsNAV71/WS/CRONUS/Page/PAG27Vendors

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Codeunit,5065)  ie. When the Web Service is published

    http://MyServer:7047/DynamicsNAV71/WS/CRONUS/Codeunit/COD5065EmailLogging

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Page,27,record) List Page

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runpage?page=27&bookmark=23;FwAAAAJ7/0kAQwAxADAAMwAw

    GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Page,26,record) Card Page

    dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runpage?page=26&bookmark=23;FwAAAAJ7/0kAQwAxADAAMwAw

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Page,27,record) List Page

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient?company=CRONUS&page=27&bookmark=23;FwAAAAJ7/0kAQwAxADAAMwAw

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Page,26,record) Card Page

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient?company=CRONUS&page=26&bookmark=23;FwAAAAJ7/0kAQwAxADAAMwAw

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Page,27,record)

    http://MyServer:7048/DynamicsNAV71/OData/Company('CRONUS')/PAG27Vendors('IC1030')

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Page,27)

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient?company=CRONUS&page=27

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Report,6)

    https://navwebsrvr:443/DynamicsNAV71_Instance1/Webclient?company=CRONUS&report=6

    If the GETURL function is called with invalid parameters, it will return an empty string. In that case, you can find the related error text by calling the GETLASTERRORTEXT function.

    Function Call

    Error Message

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Table,27)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Codeunit,5065)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Query,9150)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::XmlPort,5150)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Table,27)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Page,27)

    The Page object, 27, that is specified for the GetUrl function has not been published in the Web Services table.

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Report,6)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Codeunit,5065)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::Query,9150)

    The Query object, 9150, that is specified for the GetUrl function has not been published in the Web Services table.

    GETURL(CLIENTTYPE::OData,COMPANYNAME,OBJECTTYPE::XmlPort,5150)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Table,27)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Page,27)

    The Page object, 27, that is specified for the GetUrl function has not been published in the Web Services table.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Report,6)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Codeunit,5065)

    The Codeunit object, 5065, that is specified for the GetUrl function has not been published in the Web Services table.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Query,9150)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::XmlPort,5150)

    The specified object type parameter for the GetUrl function is not valid.

    GETURL(CLIENTTYPE::SOAP,COMPANYNAME,OBJECTTYPE::Page,27,record)

    You cannot specify a record parameter for the GetUrl function when the object type is SOAP

    NAV Usage Example

    The following example shows how to use the GETURL function in codeunit 440 to ensure that the notification mail in Document Approvals can link to both the Microsoft Dynamics NAV Windows client and the Microsoft Dynamics NAV web client:

    This resulting UI looks as follows.

    The first link opens the approval document in the Microsoft Dynamics NAV Windows client. The second link (Web view) opens the same document in the Microsoft Dynamics NAV web client.

     

    Best regards,

    Mike Borg Cardona, Bogdana Botez, and the Microsoft Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    Creating your first Hello World control add-in for the Web client

    • 0 Comments

    In Microsoft Dynamics NAV 2013 R2, the Microsoft Dynamics NAV Web client now also supports extensibility, enabling control add-ins that display, for example, a chart or a map.

    This means that you can write new control add-ins that you can use on both the Windows client and on the Web client. The following tutorial will walk you through the steps of creating a Hello World example that displays on the Web client.

    To complete the following steps, you will need:

    • Microsoft Dynamics NAV 2013 R2 with a developer license. For more information, see System Requirements for Microsoft Dynamics NAV 2013 R2.
    • CRONUS International Ltd. demonstration database.
    • Microsoft Visual Studio 2008 Express, Microsoft Visual Studio 2008, Microsoft Visual Studio 2010, or Microsoft Visual Studio 2012.
    • Microsoft .NET Framework Strong Name tool (sn.exe). This is included with Visual Studio and the Windows SDK.
      • By default, the Microsoft .NET Framework Strong Name tool is located in C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bin\NETFX <version> Tools or in a location similar to this one, depending on what operating system you are using.
    • Experience using Visual Studio.

    To create your first Hello World control add-in for the Web client

    1. In Visual Studio, create a new Visual C# project of type Class Library. Name the solution HelloWorld.
    2. Add a reference to the following assembly:
      Microsoft.Dynamics.Framework.UI.Extensibility.dll.
    3. Open the Class1.cs file and add the following lines of code:

      // Copyright ©Microsoft Corporation. All Rights Reserved.

      // This code is released under the terms of the Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)

      using System;

      using System.Collections.Generic;

      using System.Linq;

      using System.Text;

      using System.Threading.Tasks;

      using Microsoft.Dynamics.Framework.UI.Extensibility;

       

       

      namespace HelloWorld

      {

          public class Class1

          {

              [ControlAddInExport("HelloWorld")]

              public interface iHelloWorld

              {

                  [ApplicationVisible]

                  event ApplicationEventHandler ControlAddInReady;

              }

          }

      }

    4. In Visual Studio, on the Project menu, choose ClassLibrary Properties, and then choose Signing. Select the Sign the Assembly check box and choose
      a strong name key file.

    5. Now build the project.

    6. Once the project is built, you must copy the output assembly file to the computer that is running the Microsoft Dynamics NAV Development Environment. You locate and copy the control add-in assembly file (.dll), which is in the control add-in project output folder. By default, this is C:\Documents\MyDocuments\Visual Studio\Projects\[Your Addin Project]\[Your Class Library]\bin\Debug.

    7. On the computer running the development environment, paste the assembly file in the Add-ins folder. By default, this is C:\Program Files (x86)\Microsoft Dynamics NAV\71\RoleTailored Client \Add-ins.

      At this point, in more complicated scenarios, you will create a manifest file and any resource files that you need to display your control add-in, such as images or style sheets. But for this HelloWorld example, we will skip right to registering the control add-in in Microsoft Dynamics NAV.

    8. To register a control add-in, you include it in the Control Add-ins page in the Microsoft Dynamics NAV client. Enter the name of the control add-in as stated in the Microsoft.Dynamics.Framework.UI.Extensibility.ControlAddInExport, which in this code example is HelloWorld.

    9. Enter the public key token, which you can determine by running the Microsoft .NET Framework Strong Name tool (sn.exe) on the assembly.

    10. Enter a descriptive text for your control add-in.
      Now only a few steps remain to include your HelloWorld control add-in on a page.

    11. From the Microsoft Dynamics NAV Development Environment, open Object Designer.

    12. Create a new page and add a field control that can hold the HelloWorld control add-in. Something very simple like this will do:

    13. Open the Properties window for the field control, locate the ControlAddIn property and select the HelloWorld control add-in from the Client Add-in lookup window. Choose the OK button.

    14. Save and compile the page. Remember the page ID for the next step.

    15. Run the new page from a web browser with the following command:
      http://MyWebServer:8080/DynamicsNAV71/WebClient/list.aspx?company=CRONUS%20International%20Ltd.&page=MyPageID

    16. You should now see something like this:

    Now you probably want to try a more advanced example. Go to Help for Microsoft Dynamics NAV 2013 R2 and read through the documentation on extending Microsoft Dynamics NAV. For more information, see Walkthrough: Creating and Using a Client Control Add-in in the MSDN Library.

    Best regards,

    The Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    How to Deploy a Microsoft Dynamics NAV 2013 R2 Help Server

    • 8 Comments

    As most of you have already found out, we, the NAV R&D team, have developed a new Help Server that shows Help on a website. Help is available for the Windows client as in earlier versions. With the Help Server, the same Help is available from the Web client. Choose a field, and context-sensitive Help opens.

    The Help Server is a website that displays HTML files. Yes, you read correctly: HTML files. So you don’t have to decompile the Microsoft CHM files anymore. But the really good news is that the Help that you created for your current NAV solution will still work with the new Help Server. You just need to build it again with the new Help Toolkit, and then copy the resulting HTML files to the relevant folder on the Help Server website. Then, you can start connecting your users to the Help Server.

    Here are the main steps for deploying your Help to your customers.

    1. Install the Microsoft Dynamics NAV 2013 R2 Help Server. For more information, see Microsoft Dynamics NAV Help Server in the MSDN Library.
      • When you choose the Help Server option in Microsoft Dynamics NAV Setup, a Help Server website is set up for you with folders containing the HTML Help that Microsoft provides.
    2. Install the Microsoft Dynamics NAV 2013 Help Toolkit that is available for download from PartnerSource.
    3. Rebuild your existing Help files with the NAV 203 version of HelpBuilder, but change some of the configuration settings. For more information, see Upgrading Your Existing Help Content in the MSDN Library.

    4. Add the HTML files that HelpBuilder creates to the relevant language-specific folders on your Help Server website.

    5. Grant your users access to the website.

    6. Configure the Microsoft Dynamics NAV 2013 R2 clients to look up Help on your Help Server.

      • This configuration is part of Microsoft Dynamics NAV 2013 R2 Setup. Alternatively, you can configure the Web client server components and the Windows clients manually.

    7. Start a Microsoft Dynamics NAV 2013 R2 client and access Help.

    You can set up a Help Server that all your users can access, or you can set up multiple Help Servers. You can modify the Microsoft-provided Help content without decompiling anything, and you can add and remove Help content whenever you want to. You can add links to existing Word documents or PDF documents to the navigation pane of the Help Server website, so that you users have a single point of entry for Help.

    With the Microsoft Dynamics NAV 2013 R2 Help Server, you can provide the Help content that is relevant for your users, and you can update Help without modifying each client computer.

    We will improve the Help Server in future releases of Microsoft Dynamics NAV, so we hope you will like it as much as we do.

     

    Best regards,

    The Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    Update Rollup 7 for Microsoft Dynamics NAV 2013 has been released

    • 7 Comments

    Today we have released update rollup 7 for Microsoft Dynamics NAV 2013 (Build 35488).

    Update rollup 7 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 and includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    • AU – Australia
    • DE - Germany
    • DK - Denmark
    • FR - France
    • IT - Italy
    • NA – North America
    • NL – Netherlands
    • NZ – New Zealand
    • UK - United Kingdom

    Where to find update rollup 7

    You can download update rollup 7 from KB 2892427 -  Update Rollup 7 for Microsoft Dynamics NAV 2013 (Build 35488).

    The hotfixes that have been released since update rollup 6 are listed in KB 2892427. For a full list of all hotfixes included in the update rollup, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

    PartnerSource:

    More Information

    For more information about update rollups for Microsoft Dynamics NAV 2013, see Announcement of new hotfix process for Microsoft Dynamics NAV 2013.

  • Microsoft Dynamics NAV Team Blog

    How to: Enable Import/Export of Bank or Payroll Files Using the Data Exchange Framework

    • 4 Comments

    The formats of files for exchange of bank or payroll data with ERP systems vary depending on the supplier of the file and on the country/region. The generic version of Microsoft Dynamics NAV does not support local bank or payroll file formats out-of-the-box. Microsoft Dynamics NAV therefore includes a data exchange framework that makes it easy for partners to enable users to import or export bank and payroll files in any format. For more information, see “Microsoft Dynamics NAV 2013 R2 Data Exchange Framework - Design Insights” on Microsoft Dynamics PartnerSource.

    In the Posting Exchange Definition and the Posting Exchange Mapping windows, you describe the formatting of a bank or payroll file and which columns in the file map to which fields in Microsoft Dynamics NAV. When such a data exchange  setup is created and activated in the framework, users can choose the related file format to start import or export of the bank files in question.

    Note: This blog post is accompanied by the Data Exchange Framework Files.zip, which contains the page objects that make up the UI to the Data Exchange Framework. The page objects will be generally available, in a different number range, in Microsoft Dynamics NAV 2013 R2 Feature Pack 1.   

    This topic includes the following procedures:

    • To implement page objects published on NAV Team Blog
    • To make the required actions and setup fields available to users
    • To create a data exchange setup
    • To export a data exchange setup as an xml file for use by others
    • To use an XML file with an existing data exchange setup
    • To activate a data exchange setup

    To implement page objects published on NAV Team Blog

    1. Download DataExchangeSetupPages.txt to an appropriate location.
    2. Open Microsoft Dynamics NAV Development Environment.
    3. On the toolbar, choose File, and then choose Import.
    4. Select DataExchangeSetupPages.txt, and then choose Open.
    5. Set a filter for pages 50001..50008, select the eight pages, choose Tools, and then choose Compile.
    6. In the Object Designer, choose MenuSuite, choose New, select an appropriate design level, and then choose OK. Alternatively, select an existing MenuSuite, and then choose Design.
    7. In the Navigation Pane, choose the Administration button.
    8. Choose Application Setup, and then choose General.
    9. Right-click the General node, and then select Create Item.
    10. In the Create Item window, fill the fields as described in the following table.

      Field

      Description

      Object Type

      Page

      Object ID

      50002

      Caption

      Posting Exchange Definitions

      CaptionML

      ENU=Posting Exchange Definitions

      Department

      Lists

    11. Choose the OK button.
    12. Select the new or edited MenuSuite, choose Tools, and then choose Compile.
    13. Restart Microsoft Dynamics NAV.

    You can now find the Posting Exchange Definitions page with the Search function.

    To make the required actions and setup fields visible to users

    Because no bank or payroll file formats are supported out-of-the-box, the actions and setup fields for the import functionality are hidden by default. As a first step, you must make the Import Bank Statement, Import Payroll Transaction, and Bank Statement Details actions visible in the General Journal window and you must make the Import Bank Statement and Bank Statement Details actions visible in the Bank Acc. Reconciliation window. In addition, you must make the Bank Statement Import Format field visible in the Bank Account Card window, and you must make the Payroll Data Import Format field visible in the General Ledger Setup window. This is described in the following procedure.

    1. Open Microsoft Dynamics NAV Development Environment.
    2. In the Object Designer, find page 379, Bank Acc. Reconciliation, and then choose Design.
    3. Find the ImportBankStatement action and change the Visible property to TRUE.
    4. Find the ShowStatementLineDetails action and change the Visible property to TRUE.
    5. Save and compile the object.
    6. In the Object Designer, find page 39, General Journal, and then choose Design.
    7. Find the ImportBankStatement action and change the Visible property to TRUE.
    8. Find the ImportPayrollTransaction action and change the Visible property to TRUE.
    9. Find the ShowStatementLineDetails action and change the Visible property to TRUE.
    10. Save and compile the object.
    11. In the Object Designer, find page 370, Bank Account Card, and then choose Design.
    12. Find the Bank Statement Import Format field and change the Visible property to TRUE.
    13. Save and compile the object.
    14. In the Object Designer, find page 118, General Ledger Setup, and then choose Design.
    15. Find the Payroll Trans. Import Format field and change the Visible property to TRUE.

    Note: You can also perform the work described above by using the Customize This Page function in the UI to add the actions and field to the pages.

    To create a data exchange setup

    If no data exchange setup exists to enable import or export of a specific bank or payroll file, either in Microsoft Dynamics NAV or as an external XML file, then you must manually create the setup. In the Posting Exchange Definition window, you must specify the setup and describe the line and column formatting of the file. In the Posting Exchange Mapping window, you must map columns in the file to fields in Microsoft Dynamics NAV. This is described in two following procedures.

    Note: If the bank or payroll file is in xml format, then the term column in the following procedure should be interpreted as an xml element that contains data.

    To specify the setup and describe the line and column formatting

    1. In the Search box, enter Posting Exchange Definitions, and then choose the related link.
    2. On the Home tab, in the New group, choose New.
    3. On the General FastTab, describe the data exchange setup and the file type by filling the fields as described in the following table.

      Field

      Description

      Code

      Enter a code to identify the data exchange setup.

      Name

      Enter a name for the data exchange setup.

      Type

      Specify what type of exchange the data exchange setup is used for.

      You can select between three types:

          Bank Statement Import

          Payment Export

          Payroll Import

      File Type

      Specify what type of file that the data exchange setup is used for. You can select between three file types:

      •     XML: Layered strings of content and markup surrounded by tags denoting function.
      •     Variable Text: A file type where records have variable length and are separated by a character, such as comma or semi-colon. Also known as delimited.
      •     Fixed Text: A file type where records have the same length, using pad characters, and where each record is on a  separate line. Also known as fixed-width.

      Processing XMLPort ID

      Specify through which XMLport the data in the file will be   exchanged.

      Header Lines

      Specify how many header lines exist in the file. This ensures that the header data is not imported.

      Note: This field is only relevant for import.
       

      Header Tag

      If a header line exists in several places in the file, enter the text of the first column on the header line.

      This ensures that the header data is not imported.

      Note: This field is only relevant for import.

      Footer Tag

      If a footer line exists in several places in the file, enter the text of the first column on the footer line.

      This ensures that the footer data is not imported.

      Note: This field is only relevant for import.

      Column Separator

      Specify how columns in the file are separated, if the file is of type Variable Text.

      File Encoding

      Specify the encoding of the file.

      Note: This field is only relevant for import.


       
    4. On the Posting Line Definitions FastTab, describe the formatting of lines in the file by filling the fields as described in the following table.

      Note: For import, you only create one line for the single format of the bank statement file that you want to import. 
                For export, you can create a line for each payment type that you want to export. In that case, the Posting Column Definitions FastTab shows different columns for each payment type.



      Field

      Description

      Code

      Enter a code to identify the line in the file.

      Name

      Enter a name that describes the line in the file.

      Column  Count

      Specify how many columns the line in the bank statement file has.

      Note: This field is only relevant for import.

    5. Repeat step 4 to create a line for every payment type that you need to export.

    6. On the Posting Column Definitions FastTab, choose Insert Default Definitions to prefill values for columns that are required by minimum to import a bank statement file.

      Note: You cannot use the Insert Default Definitions function for a data exchange setup of type Export.
    7. Describe the formatting of columns in the file by filling or editing the fields as described in the following table. 

      Field

      Description

      Column No.

      Specify the number that reflects the column’s position on the line in the file.

      For XML files, specify the number that reflects the element’s type in the file.

      Name

      Specify the name of the column.

      For XML files, specify the markup that marks the data to be exchanged.

      Data Type

      Specify if the data to be exchanged is of type Text, Date, or decimal.

      Data Format

      Specify the format of the data, if any. For example, MM-dd-yyyy if the data type is Date.

      Note: For export, specify the data format according to Microsoft Dynamics NAV. For more information, see Identifiers, Data Types, and Data Formats.

      Note: For import, specify the data format according to .Net. For more information, see Standard Date and Time Format Strings.

      Data Formatting Culture

      Specify the culture of the data format, if any. For example, en-US if the data type is Decimal to ensure that comma is used as the .000 separator, according to the US format. For more information, see Standard Date and Time  Format Strings.

      Note: This field is only relevant for import.

      Description

      Enter a description of the column, for informational purposes.

      Constant

      Specify any type of data that you want to export in this column, such as extra information about the payment type.

      Note: This field is only relevant for export.

     

     
      
      
      
     

     
      

    To map columns in the file to fields in Microsoft Dynamics NAV

    1. On the Posting Line Definitions FastTab, select the line for which you want to map columns to fields, and then choose Field Mapping. The Posting Exchange Mapping window opens.
    2. On the General FastTab, specify the mapping setup by filling the fields as described in the following table.


      Field

      Description

      Table ID

      Specify the table that holds the fields to or from which data is exchanged according to the mapping.

      Name

      Enter a name for the mapping setup.

      Processing Codeunit ID

      Specify the codeunit that is used to transfer the data in  or out of Microsoft Dynamics NAV.

    3. On the Field Mapping FastTab, specify which columns map to which fields in Microsoft Dynamics NAV by filling the fields as described in the following table.

      Field

      Description

      Column   No.

      Specify which column in the file you want to define a map for.

      You can only select columns that are represented by lines on the Posting Column Definitions FastTab in the Posting Exchange Definition window.

      Field ID

      Specify which field the column in the Column No. field maps to.

      You can only select from fields that exist in the table that you specified in the Table ID field on the General FastTab.

      Optional

      Specify that the map will be skipped if the field is empty.

      Note: If you do not select this check box, then an export error will occur if the field is empty.

      Note: This field is only relevant for export.

      

    To export a data exchange setup as an XML file for use by others

    When you have created the data exchange setup for a specific bank statement or payroll transaction file, you can export the data exchange setup as an XML file that can be used to quickly enable import of the file in question. This is described in the following procedure.

    1. In the Search box, enter Posting Exchange Definitions, and then choose the related link.
    2. Select the data exchange setup that you want to export.
    3. On the Home tab, in the Import/Export group, choose Export Data Exchange Setup.
    4. Save the XML file that represents the data exchange setup in an appropriate location.

    To use an XML file with an existing data exchange setup

    If a data exchange setup has already been created, then all you have to do is to import the XML file into the Data Exchange Framework. This is described in the following procedure.

    Note: For instructional purposes, this procedure includes steps to create the xml file from sample content. Alternatively, use the sample xml file that is published on the NAV Team Blog.

    The resulting data exchange setup enables import of a bank statement file with the following sample content. 


     
     

    1. Create a text file and copy the following sample XML into it.

      <?xml version="1.0" encoding="UTF-16" standalone="no"?>
      <root>
         <PostExchDef Code="MYCSV" Name="My CSV Bank Statement" Type="0" CustomXMLPort="1220" ColumnSeparator="2" FileType="1">
          <PostExchLineDef Code="" Name="" ColumnCount="0">
           <PostExchColumnDef ColumnNo="1" Name="Transaction date" Show="true" DataType="1" DataFormat="dd-MM-yyyy" DataFormattingCulture="da-DK" />
           <PostExchColumnDef ColumnNo="2" Name="Text" Show="true" DataType="0" />
           <PostExchColumnDef ColumnNo="3" Name="Amount" Show="true" DataType="2" DataFormattingCulture="da-DK" />
           <PostExchColumnDef ColumnNo="4" Name="Balance" Show="true" DataType="2" DataFormattingCulture="da-DK" />
           <PostExchColumnDef ColumnNo="5" Name="Value date" Show="true" DataType="1" DataFormat="dd-MM-yyyy" DataFormattingCulture="da-DK" />
           <PostExchMapping TableId="81" Name=" My CSV to General Journal Mapping" PostExchNoFieldId="1220" PostExchLineFieldId="1223">
             <PostExchFieldMapping ColumnNo="1" FieldId="5" />
             <PostExchFieldMapping ColumnNo="2" FieldId="8" />
             <PostExchFieldMapping ColumnNo="3" FieldId="13" />
           </PostExchMapping>
           <PostExchMapping TableId="274" Name=" My CSV to Bank Rec. Lines" PostExchNoFieldId="17" PostExchLineFieldId="18">
             <PostExchFieldMapping ColumnNo="1" FieldId="5" />
             <PostExchFieldMapping ColumnNo="2" FieldId="6" />
             <PostExchFieldMapping ColumnNo="3" FieldId="7" />
             <PostExchFieldMapping ColumnNo="5" FieldId="12" />
           </PostExchMapping>
          </PostExchLineDef>
         </PostExchDef>
      </root>
       
    2. Save the text file as Unicode encoding.
    3. In the Search box, enter Posting Exchange Definitions, and then choose the related link.
    4. On the Home tab, in the New group, choose New. The Posting Exchange Definition window opens.
    5. On the Home tab, in the Import/Export group, choose Import Data Exchange Setup.
    6. Select the file that you saved in step 1.

    To activate a data exchange setup

    The data exchange setup for a payroll file is now ready for use. The data exchange setup for bank files is now available to be selected in the Bank Export/Import Setup window to activate the setup. For export of bank payment files, you must connect the setup code that you specified for one or more payment types to the related payment method. This is described in the two following procedures.

    To select the data exchange setup from the relevant bank account

    1. Open the Bank Account Card window of the bank that you want to import bank statement files to
    2. In the Bank Statement Import Format field or the Payment Export Format field, choose the lookup button, and then choose Advanced.
    3. In the Bank Export/Import Setup window, create a new line and fill the fields as described in the following table.

      Field

      Description

      Posting Exch. Def. Code

      Select the code that represents the data XML file with a  data exchange setup that you have imported. For more information, see the “To import an XML file with a data exchange setup” section.

      Code

      Specify a code to identify for the setup.

      This is the code that users will select in the Bank Statement Import Format field in the Bank Account Card window.

      Name

      Specify a name for the setup.

      Direction

      Select Export or Import, to specify if this setup will be used to  import a bank file or to export a bank file.

      Processing Codeunit ID

      Select the codeunit that will import the bank statement data.

      Processing XMLPort ID

      Select the XMLport through which the bank statement data is imported.

     

    To connect the setup for one or more payment types with the relevant payment method(s)

    1. In the Search box, enter Payment Methods, and then choose the related link
    2. In the Payment Methods window, select the payment method that is used to export payments from, and then choose the Payment Type field
    3. In the Payment Identifiers window, select the code that you specified in the Posting Line Definitions FastTab in step 4 in the “To specify the setup and describe the line and column formatting” section.

    Users can start to import or export a bank file by selecting the related setup code in the Bank Statement Import Format or Payment Export Format fields. For more information, see the “How to: Import Bank Statements” or “How to: Export  Payments to a Bank File” topics in the Application Help.

    To start importing a payroll file that has been set up as a data exchange setup, users simply select the setup in the Payroll Trans. Import Format field. For more information, see the “How to: Import Payroll Transactions” topic in the Application Help.

    Best regards,

    The NAV Application team 

     

     

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 2013 R2 Now Available

    • 17 Comments

    We are proud to announce that we have shipped Microsoft Dynamics NAV 2013 R2 and that it is now available for download. Yesterday, the announcement was made to the more than 500 partners at the sold-out Directions US event in Nashville, Tennessee. Microsoft Dynamics NAV 2013 R2 adds great new capabilities to the product such as single sign-on with Office 365 and SharePoint Online, a new UI for the Microsoft Dynamics NAV Web client and the Windows client, a new foundation for cash management, a new Help Server, and powerful provisioning and administration tools. Read the announcement on The Edge.

    Best regards,

    The NAV R&D team

  • Microsoft Dynamics NAV Team Blog

    Handling defective items: manufacturing re-work

    • 0 Comments

    Manufacturing re-work ... this is a critical area.

    Assume this scenario:

    • Item X is produced
    • Released Production Order (RPO) is created to produce item X
    • When output is done, we realized item X is not good and needs to be sent back to shop floor for a re-work
    • Under same RPO as above, we consume item X
    • This is rework and this is output again with the proper quality
    • All this is done on the same day

    Mmmm ... I see some issues on this business process:

    • First: what about if I would like to perform an analysis on the quality of your manufacturing process? Here, I am using same RPO is used to produce and to re-work what was produced earlier. Thus, it would be difficult to analyze if my manufacturing processes need to be improved or not: everything is consolidated together. We might need to have the re-work isolated so you can check and improve your manufacturing process.
    • Second: what about costing? What about if RPO is based on the consumed together plus the re-work. Also, costing desing in NAV prevents producting 1 item which is also consumed on same production order line. This will cause a loop.

    If you would like to minimize your re-work activities, better to analyze why those happen by having a separate entity (separate production order maybe). If you would like to understand how much it cost to produce the item better to have also a separate entity.

  • Microsoft Dynamics NAV Team Blog

    Planning with reorder point item is disrupted with reservations

    • 0 Comments

    This is not NAV, not even ERP ... this is just planning.

    If you have a reorder item, you would like to plan stock level. Here, you asume a replenishment should be triggered when stock goes below that certain stock level (reorder point). If you have a proper calculation of this reorder point, you have some set of certainty that remaining stock (whatever is below reorder point) is enough to address incoming demands until the (just created) replenishment will come.

    Under this assumption, why bothering with reservations? Why reserving stock for a given demand? Don't you have certainty that stock would be enough? Planning will know nothing about this. If you have a stock reserved and incoming demands are coming, plan won't do anything. You user should do.

    Thus, if you ever need to reserve stock with reorder point items, you should keep in mind this might impact your planning since stock is there but cannot be used for incoming demands.

    NOTE: if your reorder point does not provide accuracy here, you should use "Safety Stock". Here, I would suggest you to read the entry just posted yesterday. In any case, this reorder point is based on the average demand within the lead time to replenishment. In other words, as an average, you should have enough stock here to cover incoming demands within time it takes to replenish.

  • Microsoft Dynamics NAV Team Blog

    Shipment date vs. Posting date vs. Due date

    • 0 Comments

    Shipment date in NAV shows the planned shipment date. This date is not when it will actually be shipped but when it is planned to be shipped. Thus, NAV is using this when planning, creating a production order from a given demand ... This shows when sales should be shipped for not being late to customer's needs.

    Due date is when production, purchase, transfer, service needs to be done. This due date requires other entity (a demand) which drives due date. As an example, if a demand should be shipped in 2 days from today and we need to manufacture the ítem, the production should be done by tomorrow (1 day earlier if safety lead time is 1D). This is the production order due date.

    Posting date is when order is actually posted. This will flow through inventory (as Posting Date column in Ítem Ledger Entries) and will also result in changes on the stock and inventory valuation.

     Sometimes we tend to confuse when dealing with the above three dates. To keep it short:

    - Due date is calculated from other date (ie. production due date or purchase expected receipt is calculated from its demand requirement/shipment date

    - Due date and shipment date are consistent through date conflict functionality in NAV (ie. if a production is specifically required for a demand through an order-to-order binding, the productiondue date cannot be later than demand shipment date)

    - Posting dates should also be consistent. Here, NAV offers the "negative inventory" functionality where it allows posting in negative stock. Thus, NAV does not check all scenarios where posting dates are in conflict

     The above is interesting when thinking about how date refresh should behave. As an example, what if ...

    - Item with lot-for-lot

    - We have a demand for Sept 1st

    - We do not have capacity in Aug

    - Should the production due date be Aug 31st or Aug 1st?

    The above is a relevant question since setting one due date or the other might mean not being able to group other demands within same replenishment. Thus, even this sounds a dummy topic (these are just dates, uh?), it is important to understand the differences and consequences on setting one or the other while it is also good to avoid the very frequence confussion with (planned) shipment date (versus what was the actual shipment date).

Page 5 of 43 (639 items) «34567»