• Microsoft Dynamics NAV Team Blog

    .NET Interoperability in NAV 2009 R2

    • 15 Comments

    The greatest development platform in the world meets the greatest set of functional libraries, types, methods, and properties as Microsoft Dynamics NAV 2009 R2 allows developers to take advantage of the Microsoft .NET Framework! With NAV 2009 R2, you can reference external .NET components and make use of the Types and Functions from .NET Framework assemblies and from your own or 3rd party code.

    Being able to use .NET from C/AL code has been planned for a long time - the whole NAV Server architecture released with NAV 2009 has been building to this time where we can finally reach out from the NAV C/AL context and make use of these functions. The feature is very much part of our roadmap going forward where we want to give developers more power and allow partners to create solutions with much broader reaches than can be achieved within a native C/AL environment.

    Referencing an external component will be similar to the pattern that Automation developers are accustomed to - you can quickly choose a component from the variable declaration window and then start using the object in C/AL with full support from NAV's Symbol Menu (F5). 

    When working with variables of type DotNet, we distinguish between two sorts: Add-ins and those registered from the Global Assembly Cache (GAC). The Add-in type are those that are custom made or custom written, they do not need to be strong-named, and they may also change or are updated often. These components must be copied into a new directory (the Add-ins directory) on the developer's C/SIDE installation in order to be utilized. Variables based on types registered in the GAC are less likely to be swapped around but support strong-named types and include components like the .NET Framework. .NET Framework components have the additional benefit that they are already deployed on computers so there is no need for additional deployment!

    Rather than elaborate more on the properties and definitions, let's look at a sample. In this code sample, we will use methods from the .NET Framework to retrieve a list of processes running on the NAV Server and show the process IDs in a message box. The sample is not exactly an ERP task but shows what can now be achieved by using .NET and hopes to show that familiar code patterns can be applied.

    This screenshot shows the whole solution:

    Notice that we have declared two DotNet variables here - myproclist, which is a System.Array and holds our list of processes, and process, which is a System.Diagnotics.Process subtype. Both variables are from the .NET Framework and are thus registered in the system GAC and we don't need to worry about deploying them for when we run the code.

    Notice also that unlike Automation (based on COM), you don't always need to CREATE the objects. In DotNet, objects need to have a constructor called when they are instance-based or they may be used directly if they are static. The GetProcesses method is a static method in .NET, as we can see in the information section in our ever-helpful Symbol Menu.

    Notice also that the C/AL code is able to loop through the Array. Using arrays (be they NAV arrays or .NET System.Arrays) is such a common programming pattern that it would be very wrong of us to not include it.

    Of course using .NET is only supported on the NAV Server and, like Automation, you can also run the .NET objects either on the NAV Server or on the RoleTailored client.

    Using .NET in C/AL will open many new options - more than we can possibly imagine. We hope you'll enjoy using this feature from NAV 2009 R2 and go on to make some fantastic new solutions for all our customers!

    Good luck and happy coding!

    Stuart

    To view a recorded version of the Hot Topic session about .NET Interoperability, see the Partner Learning Center.

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 5.1 becomes 6.0; Delivery Date H1 of 2008 becomes H2 of 2008

    • 15 Comments

    Nobody ever wants to miss a commitment that they make, and with the move of our delivery date from H1 to H2 of 2008, that is the situation we as a Dynamics NAV R&D team find ourselves in right now.  This reality is very disappointing for all of us, and definitely not what we hoped for , but I have to say that I am as excited as I have ever been about the product we are building and I am confident that you will find that the product will definitely be worth the additional wait.

    With our next version of Dynamics NAV we are making incredible leaps forward on the user experience and technology platform of the product. It was important that the market, our partners, and our customers understand the magnitude of this advance, thus we have updated the code name for this version from 5.1 to “6.0”. It is at minimum a full version worth of progress. The advances we have made include:

    ·         We have moved the product from a two-tier architecture to a three-tier architecture dramatically increasing the integration opportunities for customers.

    ·         We have added support for web services across the board and enabled all of our ISV and partner solutions to also be web serviced enabled. The win for customers is the ability to leverage the open interface from multiple applications in their organizations.

    ·         We have transitioned our runtime execution engine from an interpreted environment to a compiled environment running on.NET. Giving customers increased performance and stability and aligning us even closer with the advances being on the Microsoft Stack.

    ·         We have transitioned our reporting story to Microsoft SQL Server Reporting Services and the incredible richness that it provides for users to gain more insight into their business.

    ·         We have added a deep integration with Office SharePoint Services making it even easier to get more people in an organization working with your business system.

    ·         Finally, and most dramatically and importantly, we’ve made a MAJOR upgrade to a new Role Tailored User Experience that our research indicates that customers will absolutely Love.

    We are accomplishing this while at the same time working to ensure that we preserve customer and partner investments. This requires a robust set of transformation tools and processes in addition to the core product advancements.

    We are introducing a lot of change and we must make sure to get it right. Why the change in date?  Well there are a few reasons:

    ·         First, we just were not tracking towards the plan we had created, and we were not going to make the planned H1 2008 date.

    ·         Second, we are closely monitoring the performance and simplicity of the new 3-tier model. As a result, we made some adjustments to our designs to increase our performance and the simplicity of our install.

    ·         Third, we’ve made a huge commitment to getting more feedback on this release before shipping.  We will provide code much earlier in the release cycle in order to maximize the feedback that we can receive and process. I will talk more about this later.

    As a result of our decision to move the date of “6.0” we decided that it would possible to pull some of the work we were doing in “6.0” forward into a Service Pack for 5.0. That work includes:

    ·         We are going to deliver Dynamics Mobile support for Dynamics NAV as part of the service pack and for Dynamics NAV 4.0. This feature will allow our partners to create mobile solutions that are occasionally connected and fully integrated with Dynamics NAV.

    ·         We brought forward a number of Microsoft SQL data access improvements. These will increase both the performance and scalability of the product.

    ·         We have added a collection of small features that have been highly requested over the years.

    ·         We have rolled up a number of the improvements and corrections that have been done since version 5.0 shipped.

    ·         We will expand the number of countries that will have version 5.0 in their markets.

    Dynamics NAV 5.0 is a great release, and with these additions it will be even better. Because of the investment we’ve made in the transition process from 5.0 to “6.0” customers and partners should not hesitate to make the move to 5.0 now.

    Earlier I mentioned that we are increasing our feedback process before we release “6.0”. Here is some of what we are planning at this point:

    ·         In November at the Directions Conference in Orlando, the entire NAV R&D leadership team will be there to do an entire day of sessions, running the current “6.0” code, discussing the transformation process, showing our new concepts, and working to gather as much input as we can. We will also provide a set of pre-recorded step by step demos of the “6.0” product that can be used to build familiarity with the product.

    ·         Also in November we will deliver a preview version of the product to 50 ISV’s who are part of our early adopter program. These partners have committed to working with the product and providing us with feedback. This drop will be of our core release.

    ·         In Q1 and Q2 of 2008 we will release updated previews to the entire partner community . These will be early availability drops and will need to be treated as such; our intent is to gather feedback on quality, performance, and any transition process issues that partners can identify.

    ·         The Q2 version will also be localized to a selected number of countries, and we will be working with a small number of partners and customers to work on transitioning their solutions onto the “6.0” product. 

    ·         The final beta will be provided in Q3 and we will deliver a version for select countries that we will use with our early adopter customers to take them live on the product. By going through the full implementation process and getting end user feedback we are confident that we will have exercised the product to the level where we can all be confident in the solution

    As a Dynamics R&D team we are extremely committed to this plan and we are doing everything we can to make sure we get feedback, react to the feedback, and deliver a high quality solution.

    The team and I are really, really, really excited about the product we are bringing your way.  I sincerely hope that this quick glimpse behind the scenes into our delivery plan increases both your confidence and anticipation of where we are taking Dynamics NAV.  With well over 1,000,000 users today Dynamics NAV is already a great product, Version 5.0, Version 5.0 SP1 and Version “6.0” are moving it forward towards and even better future. It is a ride you will most definitely want to be a part of.

    Darren Laybourn

  • Microsoft Dynamics NAV Team Blog

    Saying Farewell to the Native Database

    • 14 Comments
    I've met many people who imagine that everyone who works at Microsoft must be of a single mind, with one goal - much like a hive mentality. Nothing could be further from the truth. We are an organization of individuals, often passionate about our beliefs and very emotionally invested in the work that we do. We're very proud of our successes and we want to learn from our failures. We're very human. And as such, when I was asked to work with a team that would decouple the NAV product from our native database, it was with an element of sadness that I agreed. I can also admit that I wanted to do the job because, like many of you, I've worked with this product for over a decade and I wanted this one to happen by someone who understood what we were saying farewell to.    

    You shouldn't be burdened with the technical details about decoupling the files from our build system, generating the lists of extra dlls that we no longer need to install, or reviewing documentation that has references to the database format. When we are about to commit a huge change like this to our internal systems, we send an email to all team members informing them of an impending ‘Breaking Change' and to give teams a last chance to speak up about the impact this will have in their work cycles. There were almost no issues raised but I did receive a large number of comments from team members along the lines of "are you sure we want to take this away," "aren't we giving up the NAV simplicity," and "this is sad."  And a part of me agreed.

    But it's not really sad. The day we committed this change was a bit like the last day of High School. We've all had a fabulous time but our future is ahead.

    It's not sad because the original goal of Navision was not to become a best of breed database product - we wanted to build business applications. We happened to build a very clever little database at the same time but it was never the goal to have the database as the reason that people buy NAV.

    It's not sad because now we focus on SQL Server and we can ensure that SQL is the platform we do our enhancements on. And aim to improve performance on. And benchmark on.

    We can spare our Quality Assurance (Test) organization the pain of testing on a legacy platform and double our efforts into the SQL stack. We can spare our developers from maintaining data connections for two different platforms and spare ourselves the discussion about how to take advantage of SQL features without impacting the way the native database is used. 

    I'm looking forward to everything we can now do and I hope you will join us too.

    -Stuart Glasson

    For more information about the Statement of Direction for Microsoft Dynamics NAV where we talk about ending support for the native NAV database, see this blog post.

  • Microsoft Dynamics NAV Team Blog

    Creating a web service manually, the importance of the name you give it, and a few small things to remember

    • 14 Comments

    When you use the SC command line command to create a new NAV 2009 Service, how does the new service know whether it is a middle tier for RTC to connect to, or whether it is supposed to handle web service calls?

    In other words, what decides whether the new service will be "Microsoft Dynamics NAV Server" or "Microsoft Dynamics NAV Business Web Services"?

     

    It depends on the name. If it starts with "MicrosoftDynamicsNavWS", then it will be for Web Services. If the name starts with anything else, then it will be for middle tier for RTC clients.

     

    To keep things simple, just give your NAV Servers names beginning with MicrosoftDynamicsNAV / MicrosoftDynamicsNAVWS. Then if you need a second, third, etc server, add a unique name, seperated by a $-sign, for example:

    MicrosoftDynamicsNAV$Svr2

    MicrosoftDynamicsNAVWS$Svr2

     

    Here are the simple steps for how to create a new web service service, and a few more things to be aware of. Let's say that we want to start a second set of NAV Servers.

     

    First create the normal service from a command prompt:

    SC CREATE "MicrosoftDynamicsNAV$Svr2" binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe" DisplayName= "MSSvr2"

    Then create the service for Web Services: 

    SC CREATE "MicrosoftDynamicsNAVWS$Svr2" binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $Svr2" DisplayName= "MSWSSvr2" type= share

     

    The additional settings you must provide as marked in bold above, and a few things that you must remember are:

     

    1)  The Name

    As described, the name must begin with MicrosoftDynamicsNAVWS if you want it to be for web services

     

    2)  Include the last part of the name in BinPath

    After the .exe in the binpath parameter you must specify the part of the name ($Svr2 in this case) that comes after MicrosoftDynamicsNAVWS. If you forget this step, you might get this error when you try to start the service:

    Windows could not start the MSWSSvr2 service on Local Computer.Error 1083: The executable program that this service is configured to run in does not implement the service.


     

    3)  Type must be share

    For the service that handles web services, add the parameter type= share. Otherwise the service will still try to start up as a middle tier (not for web services).

     

    4)  Spaces after =

    You must remember the space after each = in the command, as in for example "type= share". This is just the syntax of the SC-command.

     

    5)  DisplayName

    It doesn't matter what display name you give - this is just to find it in Services.

     

    These are just some of the small things to keep in mind. For many more details on web services go to Freddys blog, especially this post:

    Multiple Service Tiers - SP1

     

    // Lars Lohndorf-Larsen

     

  • Microsoft Dynamics NAV Team Blog

    Importing and Exporting Data in Microsoft Dynamics NAV 2013 R2 CU 8

    • 14 Comments

    In earlier versions of Microsoft Dynamics NAV, you could move or copy all or part of the data in a database by using the Microsoft Dynamics NAV backup functionality. In Microsoft Dynamics NAV 2013 R2, the support for the .fbk files was removed, but with Cumulative Update 8 for Microsoft Dynamics NAV 2013 R2, we introduce Windows PowerShell cmdlets so you can export data from a Microsoft Dynamics NAV database and import it into another Microsoft Dynamics NAV database. You can also export and import data in the Microsoft Dynamics NAV Windows client.

    You can export and import a single company or all companies in a database, and you can export and import other types of data such as global data, application data, and application objects. As part of Cumulative Update 8, we include a whitepaper that provides examples of the types of data and how to export and import data using Windows PowerShell cmdlets as well as in the Microsoft Dynamics NAV Windows client.

    When you export data from a Microsoft Dynamics NAV database, the data is stored in a file with the extension .navdata, which is a new file format that is proprietary to Microsoft Dynamics NAV data. You cannot edit the .navdata files in other tools.

    The data that you export is not deleted from the original database. So that means that you can use the functionality to essentially take a copy of your customer’s live data, leave them to continue working, while you import the data into an offline database back at your office for further debugging or other investigation. You can also use the .navdata files to move data to a new database, such as moving a company to a new database when you want to deprecate a database, for example.

    Exporting and Importing Data in the Microsoft Dynamics NAV Windows Client

    To export or import data, in the Search box, enter Data File, and then choose the related link.

    To export data, you specify the type of data that you want to export, and when you choose the OK button, you specify where you want to save the file.

    To import data, you specify the .navdata file to import data from, but you can't import an application if the .navdata file contains an application. This is because you can't overwrite the application that is currently open in the Microsoft Dynamics NAV Windows client. So the window has one less type of data that you can choose to import:

    If you want to import an application into a Microsoft Dynamics NAV database, you must use the Import-NAVData Windows PowerShell cmdlet.

    Windows PowerShell Cmdlets

    The following table describes the Windows PowerShell cmdlets that are new in Microsoft Dynamics NAV 2013 R2 Cumulative Update 8.

    Name

    Description

    Export-NAVData

    Exports data from a Microsoft Dynamics NAV database. You can export company-specific data, and you can choose to include global data, application data, or application objects.

    Import-NAVData

    Imports data into a Microsoft Dynamics NAV database from a file. You can import all data in the file, or you can choose to include specific companies, global data, application data, or application objects.

    You can only import an application into an empty database.

    Get-NAVDataFile

    Gets information from a file that has been exported from a Microsoft Dynamics NAV database.

    The extracted information includes the types of data that the file contains and any company names.

    The cmdlets take different parameter sets depending on how you connect to the database that you want to export data from or import data into. You can access the database through the Microsoft Dynamics NAV Server instance, or you can access the database directly as described in the following table.

    Access

    Description

    Through the Microsoft Dynamics NAV Server instance.

    Use parameter sets that include –ServerInstance when the database that you want to access is mounted against a Microsoft Dynamics NAV Server instance.

    The user account for the Microsoft Dynamics NAV Server instance must have access to write to the location that is specified by the –FileName parameter.

    Through a direct connection to the database.

    Use parameter sets that include –DatabaseServer and –DatabaseName when the Microsoft Dynamics NAV Server instance is stopped or not available. For example, if you want to import an updated application into a database, you stop the service so that users cannot access the database.

    You must have access to write to the location that is specified by the –FileName parameter.

    The following table describes the Windows PowerShell cmdlets that are modified in Microsoft Dynamics NAV 2013 R2 Cumulative Update 8.

    Name

    Description

    Get-NAVCompany

    Gets a list of the Microsoft Dynamics NAV companies in the specified tenant database or exported Microsoft Dynamics NAV data file.

    The cmdlet has been updated to be able to get information from a Microsoft Dynamics NAV data file.

     

    However, the Help for the Export-NAVData and Import-NAVData Windows PowerShell cmdlets does not show the correct syntax when you run a command such as the following:.

    PS C:\WINDOWS\system32> Get-Help Export-NAVData

     

    Refer to the following syntax for the Export-NAVData cmdlet:

    1. Export-NAVData -DatabaseName <string> -FileName <string> [-DatabaseServer <string>] [-ApplicationDatabaseServer <string>] [-ApplicationDatabaseName <string>] [-Description <string>] [-IncludeApplication] [-IncludeApplicationData] [-IncludeGlobalData] [-CompanyName <string[]>] [-Force]  [<CommonParameters>]

    2. Export-NAVData [-ServerInstance] <string> [[-Tenant]< TenantId>] -FileName<string> [-Description <string>] [-IncludeApplication] [-IncludeApplicationData] [-IncludeGlobalData] [-CompanyName <string[]>] [-Force]  [<CommonParameters>]

    3. Export-NAVData [-ServerInstance] <string> [[-Tenant] <TenantId>] -FileName<string> -AllCompanies [-Description <string>] [-IncludeApplication] [-IncludeApplicationData] [-IncludeGlobalData] [-Force]  [<CommonParameters>]

    4. Export-NAVData -DatabaseName <string> -FileName <string> -AllCompanies [-DatabaseServer <string>] [-ApplicationDatabaseServer <string>] [-ApplicationDatabaseName <string>] [-Description <string>] [-IncludeApplication] [-IncludeApplicationData] [-IncludeGlobalData] [-Force]  [<CommonParameters>]

     

    Refer to the following syntax for the Import-NAVData cmdlet:

    1. Import-NAVData [-FileName] <string> -DatabaseName <string> [-DatabaseServer <string>] [-ApplicationDatabaseServer <string>] [-ApplicationDatabaseName <string>] [-IncludeApplication] [-IncludeApplicationData] [-IncludeGlobalData] [-CompanyName <string[]>] [-Force] [-WhatIf] [-Confirm]  [<CommonParameters>]

    2. Import-NAVData [-ServerInstance]< string> [[-Tenant] <TenantId>] [-FileName] <string> [-IncludeApplicationData] [-IncludeGlobalData] [-CompanyName <string[]>] [-Force] [-WhatIf] [-Confirm]  [<CommonParameters>]

    3. Import-NAVData [-ServerInstance]< string> [[-Tenant] <TenantId>] [-FileName] <string> -AllCompanies [-IncludeApplicationData] [-IncludeGlobalData] [-Force] [-WhatIf] [-Confirm]  [<CommonParameters>]

    4. Import-NAVData [-FileName] <string> -DatabaseName <string> -AllCompanies [-DatabaseServer <string>] [-ApplicationDatabaseServer <string>] [-ApplicationDatabaseName <string>] [-IncludeApplication] [-IncludeApplicationData] [-IncludeGlobalData] [-Force] [-WhatIf] [-Confirm]  [<CommonParameters>]

     

    You can find more information about this functionality, and the new or changed objects, in the following documents on the W1 version of the Microsoft Dynamics NAV 2013 R2 CU8 download media:

    • MicrosoftDynamicsNAV2013R2CU8_ExportImportDataUsingNavDataFiles.pptx
    • MicrosoftDynamicsNAV2013R2CU8_ImportExportData.pdf

    In subsequent cumulative updates, the documents will be available in the country-specific downloads as well.

  • Microsoft Dynamics NAV Team Blog

    Send email with PDF attachment in NAV 2009

    • 13 Comments

    In this post I would like to explore the possibilities to create an email from the Role Tailored client and attach an invoice as a PDF file to the email, unfortunately we have do not have this functional build into our Demo application, but let me show you how this can be do with little effort.

    First I suggest you download the fob file which contains the 5 different options I will go through here.

    When downloaded the fob file you will see that I have added 5 new actions

    image

    1. SendAsPDF(Use of codeunit to rename) recommended solution
    2. SendAsPDF(Access to Server needed)
    3. SendAsPDF(With Temp file name)
    4. SendAsPDF(User prompted to save)
    5. SaveAsPDFrecommended solution(if you just want the PDF file)

    Let me go through the different options starting from the bottom, since I recommend option 1, but I would also like to share other options for doing this, since these might be valuable for you.

    Option 5: SaveAsPDF
    In this option you will get prompted if you want to open or save the PDF. The PDF file created will be based on the select Invoice in the Posted Sales Invoices List Place

    image 

    In this option all I do is to have the server create the PDF file for me and use the new download function in NAV 2009 to retrieve the PDF file created on the server.

    Option 4: SendAsPDF(User prompted to save)
    In this option, you will first be prompted to save the file.
    Here it is important to select to “”SAVE” the PDF file on the disk, to have the correct name of the PDF file. If you select to “OPEN” the PDF filename will be given a temp name.

    After you have saved the PDF we now create the email message you will get 3 messages similar to this when this happens:

    image

    You get these message because we connect to an external component(Outlook) to the Role Tailored client. It is of course up to you if you want to set this to “Always allow”, but this would remove these messages, the next time you open the Role Tailored client.

    When you have allowed these to run, email will be created with the PDF file attached.

    image

    In this option all I do is to download the PDF to the client and then use the Mail codeunit to create the email

    Option 3: SendAsPDF(With Temp file name)
    In this option, you will not be prompted to save the PDF file.
    And the email will be created immediately. This would probably be the preferred compared to downloading this to the user disk, but we will use the PDF file created on the server, and since this file get a TEMP name, like this: “__TEMP__570eb0279b9d4b1fa837caf3a14acbf7” this option is not really good.

    Let us look at the option 1 and 2 where this issue is solved.

    Option 2: SendAsPDF(Access to Server needed)
    In this option you will not be prompted to save the file either, but here the end user will need to have access the server folder where the PDF is stored on the server. In some situation you might want this, but for security reasons you might also not want to give this access to the user.

    Option 1: SendAsPDF(Use of codeunit to rename) recommended solution
    Again in this option you will not be prompted to save the PDF file, but the PDF file will be automatically added to the email. In this option we have build a codeunit to rename the TEMP file created on the server, and end user will not need to have access to any folders on the server.

    So all in all I recommend option 1 for attaching PDF file to an email. And once again I have made all the code available here, so feel to be explore how I build this. If you feel there is an option that I missed, feel free to leave a commit or use the contact form Email.

    Thanks,
    Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV

  • Microsoft Dynamics NAV Team Blog

    NAV 2013 - Reports may be difficult to read when printing over Terminal Services

    • 13 Comments

    === Blog updated on March 4th ====

    Updated with the good news that we now have a hotfix for this for Windows Server 2008 R2:

    Visual elements are displayed incorrectly etc... - KB 2768741.

    ===== end of update ===========

     

     

    In NAV 2013, if you run the Windows Client via a Terminal Server or Remote Desktop Connection (RDC) or some common 3rd party application host technology, reports may be difficult to read when you print them. Preview looks fine.

     

    A report could look like this in preview (OK):

     

     

     

    But in Print Layout rendering or when printing to paper it would look like this - notice it looks like the fonts have been scrunched and it's hard to read:

     

     

     

    When does this happen?

     

    It happens when

      A)  you run NAV 2013 via a Terminal Server or via Remote Desktop Connection (RDC), and

      B)  the screen resolution on the connection is not 4/3, and

      C)  the Terminal Server machine is running Windows 2008 including Windows 2008 R2.

     

     

    The screen resolution is the important thing here. If we use a screen resolution of 4/3 (=1.33333) then all works fine. So if my RDC looks like this then I don't have this issue:

     

    On this connection the screen resolution in my connection is 1024 by 768. 1024 / 768 = 1.33333, and everything is OK.

     

     

    But if I set the screen resolution on my RDC like this:

     

     

    Then my screen resolution = 1366 / 768 = 1.779.

    1.779 <> 1.33333 and then I have the problem.

     

     Why?

     

    The root of the problem lies in graphics rendering (GDI) in Windows 2008 when it tries to scale from a screen resolution which is not 1.33333. In Windows 2012, rendering was redesigned to take advantage of hardware acceleration and ActiveX as described in this article:

    Windows 8 graphics: Microsoft has hardware accelerated all the things

    So we do not have this problem if the host machine is running Windows 2012.

    NAV 2013 uses a newer version of Report Viewer which relies more on Windows GDI than previously, which is why we have only started seeing this problem on NAV 2013 installations.

     

     

    So what can we do?

    Based on the above there are three ways out of this problem:

    1)  Ensure that all users use a screen resolution of 4/3

    2)  Avoid a host machine trying to scale a client's resolution. For example:

      - Save the report to PDF, then print from the PDF document. PDF rendering is not affected by this issue.

      - Use server-side printing - for example make use of the Job queue and let NAS print reports. Then the server can ignore what resolution the client has.

      - Use other ways than Terminal Server to simplify client installations, such as ClickOnce or possibly "Remote Apps". In this way the client runs on the local machine and not on a host machine.

    3)  Upgrade the Terminal Server / RDC host machine to Windows 2012. Client machines do not need to be upgraded.

     

     

    Workarounds 1) and 2) could be hard to enforce in some cases. But knowing about this issue, hopefully the option of using Windows 2012 can be considered.

     

     

     We will post updates here if and when we find any further details around this issue!

     

     

     

     

     

     

     

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 2013 Compatiblity with Microsoft Windows 8 and Microsoft Windows Server 2012

    • 11 Comments

    We are proud to announce that Microsoft Dynamics NAV 2013 is compatible with Microsoft Windows 8 and Microsoft Windows Server 2012.

    We support the following versions of Microsoft Dynamics NAV with Microsoft Windows Server 2012 and Microsoft Windows 8:

    • Microsoft Dynamics NAV 2009 R2
    • Microsoft Dynamics NAV 2013

    For more information about requirements, see System Requirements for Microsoft Dynamics NAV 2013.

  • Microsoft Dynamics NAV Team Blog

    Coming Soon: Exporting and Importing Companies and Other Data

    • 11 Comments

    We are not quite ready yet, but we will soon announce the availability of new functionality for Microsoft Dynamics NAV 2013 R2: The ability to export business data, global data, and/or applications from one database and import the data into another database. Many of you used the FBK functionality to do this in earlier versions of Microsoft Dynamics NAV, but since we removed that backup/restore functionality in Microsoft Dynamics NAV 2013 R2, you have let us know how much you relied on it in your daily work. So we are working hard on this new functionality, and we will make an announcement when you can download the update.

    When the update is available, we will also update the Microsoft Dynamics NAV 2013 R2 Release Notes Follow-Up document, which is available here: https://mbs.microsoft.com/downloads/customer/NAV/NAV%202013%20R2/MicrosoftDynamicsNAV2013R2_ReleaseNotesFollowup.pdf

    Best regards,

    The Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    Installing Microsoft Dynamics NAV 2013 R2 side-by-side with Microsoft Dynamics NAV 2013

    • 11 Comments

    A year after Microsoft Dynamics NAV 2013 released, we released a new version of it, Microsoft Dynamics NAV 2013 R2. They share common files, so if you install both versions on the same computer, then they will try to use the same resources, and so you run into problems. This really means that you cannot install the two versions side-by-side.

    We resolved this issue with the fix in KB 2907588 for Microsoft Dynamics NAV 2013 R2 (build number higher than 35850). But there is some manual work that you have to do to apply the fix fully.
    Microsoft Dynamics NAV 2013 and Microsoft Dynamics NAV 2013 R2 use the same Windows registry entries to describe which interface and libraries to use. With the described fix, Microsoft Dynamics NAV 2013 R2 can use new registry entries, but simply installing the hotfix does not generate the registry entries. Windows registry settings are created by installation programs, but creating a new installer for every language is out of scope for hotfix releases.

    To get Microsoft Dynamics NAV 2013 and Microsoft Dynamics NAV 2013 R2 working side-by-side, you can choose to modify some of the existing entries in the Windows registry. But the easiest way is to delete the existing registry entries and create new entries in the registry.

    Depending on the specific machine architecture, your registry settings can include the following entries:
    " HKEY_CLASSES_ROOT\TypeLib\{5020AC1E-A4F0-402B-A920-3FED4E3B05CC}\7.1"
    " HKEY_CLASSES_ROOT\Interface\{14519985-4959-4F7C-AC30-CBBCD9DFBC08}"
    " HKEY_CLASSES_ROOT \Interface\{59521B62-D441-47E6-8224-A07203686BA2}"
    " HKEY_CLASSES_ROOT \Wow6432Node\TypeLib\{5020AC1E-A4F0-402B-A920-3FED4E3B05CC}\7.1"
    " HKEY_CLASSES_ROOT \Wow6432Node\Interface\{14519985-4959-4F7C-AC30-CBBCD9DFBC08}"
    " HKEY_CLASSES_ROOT \Wow6432Node\Interface\{59521B62-D441-47E6-8224-A07203686BA2}"

    Remove the entries.

    To create new correct windows registry entries, open the Command Prompt as an administrator, and then, run the RegAsm.exe /register Microsoft.Dynamics.Nav.Client.WinForms.dll /tlb command for each of the two products.

    For example, for Microsoft Dynamics NAV 2013, enter the following command:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb

    And for Microsoft Dynamics NAV 2013 R2, enter the following command:
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics NAV\71\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb

    When you have run those two commands on a 32-bit computer, the following entries exist in the registry:

    Microsoft Dynamics NAV 2013:
    HKEY_CLASSES_ROOT\Interface\{14519985-4959-4F7C-AC30-CBBCD9DFBC08} (where \TypeLib\Version == 7.0)
    HKEY_CLASSES_ROOT\TypeLib\{5020AC1E-A4F0-402B-A920-3FED4E3B05CC}\7.0

    Microsoft Dynamics NAV 2013 R2:
    HKEY_CLASSES_ROOT\Interface\{59521B62-D441-47E6-8224-A07203686BA2} (where \TypeLib\Version == 7.1)
    HKEY_CLASSES_ROOT\TypeLib\{95819FD3-CF0A-4706-BE93-35B3DDCB817C}\7.1

    And for 64-bits computers:
    Microsoft Dynamics NAV 2013:
    HKEY_CLASSES_ROOT\Interface\{14519985-4959-4F7C-AC30-CBBCD9DFBC08} (where \TypeLib\Version == 7.0)
    HKEY_CLASSES_ROOT\Wow6432Node\Interface\{14519985-4959-4F7C-AC30-CBBCD9DFBC08} (where \TypeLib\Version == 7.0)
    HKEY_CLASSES_ROOT\TypeLib\{5020AC1E-A4F0-402B-A920-3FED4E3B05CC}\7.0
    HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{5020AC1E-A4F0-402B-A920-3FED4E3B05CC}\7.0

    Microsoft Dynamics NAV 2013 R2:
    HKEY_CLASSES_ROOT\Interface\{59521B62-D441-47E6-8224-A07203686BA2}(where \TypeLib\Version == 7.1)
    HKEY_CLASSES_ROOT\Wow6432Node\Interface\{59521B62-D441-47E6-8224-A07203686BA2}(where \TypeLib\Version == 7.1)
    HKEY_CLASSES_ROOT\TypeLib\{95819FD3-CF0A-4706-BE93-35B3DDCB817C}\7.1
    HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{95819FD3-CF0A-4706-BE93-35B3DDCB817C}\7.1

    If you have applied everything correctly, then Microsoft Dynamics NAV 2013 and Microsoft Dynamics NAV 2013 R2 will now both be able to run on the computer.

    If you have only Microsoft Dynamics NAV 2013 R2 installed and any object run from dev env opens new RTC instance, then you can apply the same registry modify (related to 7.1) and issue will be resolved.

    Attached is PowerShell script does all job.
    BTW: If Microsoft Dynamics NAV 2013 R2 is installed alone, you can also use script - it will fix registries. 

     

    Best regards,

    Gedas Busniauskas and Jorge Alberto Torres from the Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV/SQL Server Configuration Recommendations

    • 11 Comments

    Michael De Voe, a Senior Premier Field Engineer at Microsoft, has compiled a set of recommendations for SQL Server configuration to improve performance when running Microsoft Dynamics NAV 5.0 and later versions with one of the following versions of SQL Server:

    • Microsoft SQL Server 2005 SP3 x64
    • Microsoft SQL Server 2008 SP1 x64
    • Microsoft SQL Server 2008 R2 x64

     The attached document contains Michael's recommendations, including the following options and parameters:

    • Max Server Memory
    • Auto-Create Statistics
    • Auto-Update Statistics
    • Auto-Grow
    • Database Compatibility Level
    • Trace Flag 4136
    • Trace Flag 4119
    • Data files for TempDB
    • Disk Alignment
    • Read Committed Snapshot Isolation (RCSI)
    • Max Degree of Parallelism
    • Dynamics NAV Default Isolation Level
    • Dynamics NAV "Lock Timeout"
    • Dynamics NAV "Always Rowlock"
    • Maintenance Jobs
    • Instant File Initialization
    • Optimize for Ad Hoc Workloads
    • Page Verify
    • Lock Pages in Memory

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

  • Microsoft Dynamics NAV Team Blog

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

    • 11 Comments

    Cumulative update 8 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
      • 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

    Cumulative update 8 also introduces new functionality for exporting and importing companies and other data. You can export a company from a Microsoft Dynamics NAV database and import it into another database, and you can export and import other types of data such as global data, application data, and application objects.

    In earlier versions of Microsoft Dynamics NAV, you exported and imported this type of data as part of backing up and restoring databases. In Microsoft Dynamics NAV 2013 R2 CU8, you can do this by using the Export-NAVData and Import-NAVData Windows PowerShell cmdlets. You can also import and export data in the Microsoft Dynamics NAV Windows client.

    For more information, see the following documents on the W1 version of the Microsoft Dynamics NAV 2013 R2 CU8 download media:

    • MicrosoftDynamicsNAV2013R2CU8_ExportImportDataUsingNavDataFiles.pptx
    • MicrosoftDynamicsNAV2013R2CU8_ImportExportData.pdf

    Please note that there is very limited support for exporting and importing data in the Microsoft Dynamics NAV Web client. Use the Microsoft Dynamics NAV Windows client or the Windows PowerShell cmdlets instead.

    Where to find cumulative update 8

    You can download cumulative update 8 from KB 2971746 – Cumulative Update 8 for Microsoft Dynamics NAV 2013 R2 (Build 36897).

    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

  • Microsoft Dynamics NAV Team Blog

    Using the Quick Filter in Microsoft Dynamics NAV

    • 10 Comments

    Many of you that have installed Microsoft Dynamics NAV 2013 R2 have for sure noticed that the quick filter behavior has been redesigned in this release and that is why, in this post, we will go through all the changes and the intention behind them.

     

    So let’s start with a bit of history; the first version of the quick filter was released in the Microsoft Dynamics NAV 2009 Windows client, where we replaced the filter window available in the development environment with a filter pane integrated on all Microsoft Dynamics NAV pages. Here the user both has the option of entering filter criteria as plain text and the ability of composing an advanced filter. If you would like to quickly search for a certain record, the recommended practice is to use the quick filter.

    Let’s say, for example, that we want to find a contact in the contact list starting with “Man”. We can construct the filter by selecting the Name field and entering the text “man” in the search field.

    Notice that all the contacts starting with “man” now appear in the results list. How is this working? Whatever we add to this filter will be internally translated to a string by adding ‘@’ in front and ‘*’ in the end. So our filter string ‘man’ becomes ‘@man*’ and the Windows client filters for any contact name that starts with “man” in upper or lower case.  

    The following table illustrates more Quick Filter search examples in Microsoft Dynamic NAV 2013.

    Search Criteria

    Interpreted as…

    Returns…

    Man

    @man*

    All records that start with the string man and case insensitive.

    Se

    @se*

    All records that start with the string se and case insensitive.

    Man*

    Starts with Man and case sensitive

    All records that start with the string Man

    'man'

    An exact string and case sensitive

    All records that match man exactly

    *1

    Ends with 1

    All records that end with 1

    @*man

    Ends with and case insensitive

    All records that end with man

    @man*

    Starts with and case insensitive

    All records that start with man

    As part of our development process we regularly perform usability studies and some of them showed the users instinctively thought of the quick filter as a search field and that is why we decided to modify the quick filter behavior to a “contains” rather than a “starts with”. So what does this mean?

    Let’s construct the same filter in the Microsoft Dynamics NAV 2013 R2. Notice that the search results list includes contact names which start with “Man” and even have “Man” in the middle of the name. 

    What has changed? The entered filter will be translated to a string by adding ‘@*’ in front and ‘*’ in the end. So our filter string ‘man’ becomes ‘@*man*’ and the Windows client filters for any contact name that contains “man” in upper or lower case.  

    To start with in the RTM version of Microsoft Dynamics NAV 2013 R2 we have considered the simple user approach where the special characters in the filter criteria are ignored. However, in the Cumulative Update 13 for Microsoft Dynamics NAV 2013, we have refined the user experience and now respect the entered filter criteria.

    The following table illustrates the Quick Filter search examples for the Cumulative Update 13 and later for Microsoft Dynamics NAV 2013.

    Search Criteria

    Interpreted as…

    Returns…

    Man

    @*man*

    All records that contain the string man and case insensitive.

    Se

    @*se*

    All records that contain the string se and case insensitive.

    Man*

    Starts with Man and case sensitive

    All records that start with the string Man

    'man'

    An exact string and case sensitive

    All records that match man exactly

    *1

    Ends with 1

    All records that end with 1

    @*man

    Ends with and case insensitive

    All records that end with man

    @man*

    Starts with and case insensitive

    All records that start with man

    We encourage you to check out the Cumulative Update 13 and we hope that this blog demystifies some of the behavioral differences of the quick filter across Microsoft Dynamics NAV product versions.

  • Microsoft Dynamics NAV Team Blog

    Running classic reports in RTC (RUNMODAL and a few other things)

    • 10 Comments

    Just a few points about running classic reports from RTC, based on common support scenarios:


    RUNMODAL (Not possible)

    RTC runs classic reports (reports with no RDL Layout) by starting the report engine from a classic client. However, RTC is not able to run classic reports MODALLY. RUNMODAL as opposed to just RUN means that execution of the  next line of C/AL code waits until the report has completed. Of course RTC reports which DO have a layout can run MODALLY without any problems.

    So Report.RUNMODAL on a classic report from RTC does exactly the same as Report.RUN, i.e. RTC will launch the classic report engine but not wait for the report to finish before executing the next line of code. In most cases this doesn't matter. But the challenge is when the next line of code dependeds on the report having completed, for example to email the report, convert it to pdf, write back a result of the report to the database, or something else.

     

    Running batches of classic reports (Improvement)

    The good news is that there has been a few small other improvements relating to running classic reports from RTC. When the classic client closes, it updates a few files like the .zup file, and in the case of breakpoints having been used, also NaviBP.xml as described here:
    http://msdn.microsoft.com/en-us/library/dd355196.aspx
    In case we launched a batch of classic reports, one instance of the classic report engine would start up for each report. And each instance could overwrite each other's files, leading to error messages like this:

    You cannot use the file C:\Users\[USER]\AppData\Roaming\fin.zup  because it is already in use.

    and


    Microsoft Visual C++ Runtime Library
    Runtime Error!

    Program: C:...

     This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information. 

    But with KB 2398170 (build 31587) the behaviour is changed, so that now when the classic client closes the report engine, it willl 1) only try to update the .zup file, and 2) not try to update naviBP.xml at all, avoiding the error messages mentioned above.

     
    Licenses (No, it doesn't consume a license)

    When you run a classic report from RTC, this does NOT consume a user license. If you watch the Session table while a classic report is running, you will see that a new session has connected, but with "Application Name" = '111'. In this way the system knows not to count it as a normal NAV client, so it will not count as a concurrent session.

     

     

    Lars Lohndorf-Larsen

    Microsoft Dynamics UK

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Coming Soon: Enabling Commerce Gateway for Microsoft Dynamics NAV 2013

    • 10 Comments

    With Commerce Gateway for Microsoft Dynamics NAV, companies can use Microsoft Dynamics NAV to electronically exchange trading documents with business partners regardless of conversion requirements and data formats. This helps streamline business processes and reduce transaction costs. Commerce Gateway also makes it easier for companies to meet the changing demands of their trading partners, regardless of the industry they are in, the system that they use, or the standards that their partners require.

    As some of you may have noticed, Microsoft Dynamics NAV 2013 shipped without Commerce Gateway. We have explored a number of different options for enabling Commerce Gateway. This blog post describes the recommended upgrade path for users of Commerce Gateway to make their solution compatible with Microsoft Dynamics NAV 2013.

    We are currently working on a sample application that will demonstrate how to upgrade the Commerce Gateway solution. The sample will show how you should set up the connection between Microsoft BizTalk and Microsoft Dynamics NAV using a web service. The sample will be shipped through the hotfix process, after it has been through testing. For now, we expect to release the sample at the end of March.

    New customers that need Commerce Gateway will have to upgrade their solutions from Microsoft Dynamics NAV 2009 to Microsoft Dynamics NAV 2013. For more information, see Upgrading to Microsoft Dynamics NAV 2013.

    Commerce Gateway is still included in the license as part of the product and can be purchased as normal.

    Architectural changes

    In architectural terms, the Commerce Gateway solution consists of an application part, a communication part, and a BizTalk part. The communication part is the part that requires the most changes to be able to run with Microsoft Dynamics NAV 2013. We recommend that you change the communication part to use a web service connection instead of using the Request Client and the Request Server. For this to work, it is also required that you make a few changes to the Microsoft BizTalk configuration. There are minor changes to the application part.

    The main reason changes to Commerce Gateway were required for it to work on Microsoft Dynamics NAV 2013 are the architectural changes that were introduced with this version, such as the 64-bit Microsoft Dynamics NAV Server, as well as the removal of COM support on the server. Both changes require a change in the Commerce Gateway implementation, since it relies on a 32-bit COM implementation for the Request Server and the Request Client.

    Summary of recommended changes

    1. Upgrade application code to Microsoft Dynamics NAV 2013. The application code is impacted by the removal of support for forms.
    2. Change the connection between the Microsoft BizTalk server and Microsoft Dynamics NAV 2013 to use a new web service, which will be defined in the sample. Changing your solution to use web services will simplify the Microsoft Dynamics NAV 2013 installation, as you will no longer be required to use the Commerce Gateway Request server and the Commerce Gateway Request Client.
    3. The Microsoft Dynamics NAV 2013 architecture does not allow the use of automation on the server. Consequently, we have changed five objects to use the .NET Framework XML Document Object Model (DOM). You will have to upgrade your solution to merge in these changes.
    4. Change the connection setup on the Microsoft BizTalk Server to use the web service. You will need to create a new Send port and to reconfigure the orchestrations.

    All of the above changes will be described and implemented in the code sample that will ship at the end of March.

     

    Rikke Lassen

    Senior Program Manager

Page 2 of 43 (637 items) 12345»