Options

DotNet DataType in NAV 2009 R2

jwilderjwilder Member Posts: 263
edited 2011-01-25 in NAV Three Tier
Can someone put a simple example of how to use the new DotNet datatype in NAV 2009 R2?

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    nhsejthnhsejth Member, Microsoft Employee Posts: 34
    You should download the updated documentation for Dynamics NAV R2 which contains a guide for the new DotNet interop feature.

    Look for the file NAV 2009 R2 Help Update.zip on http://www.microsoft.com/downloads/en/d ... 93c9ac282a

    In the CHM file, browse to the section "Extending Microsoft Dynamics NAV Using Microsoft .NET Framework Interoperability" in "Developer Updatges for Microsoft Dynamics NAV R2"

    The document contains a number of examples that can help you get started, if you need additional help, please feel free to contact me.
    _________________
    Niels-Henrik Sejthen
    Senior Software Developer
    Microsoft Dynamics NAV

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • Options
    jwilderjwilder Member Posts: 263
    When I download,extract and run this file it doesn't display the text on the right hand window, it says "This program cannot display the webpage". Any thoughts?
  • Options
    ArmondsArmonds Member Posts: 66
    jwilder wrote:
    When I download,extract and run this file it doesn't display the text on the right hand window, it says "This program cannot display the webpage". Any thoughts?

    I had the same problem when I was trying to open chm from network drive. After copying it to local drive it open without problems. Also check file attributes and permissions.
  • Options
    forki23forki23 Member Posts: 8
    Hi,

    it seems there are only samples with .NET framework code. It would be nice to see a sample with custom .NET assemblies.

    I'm always getting an unspecific error when I try to use a custom constructor. NAV is telling me that it can't create an instance of my .NET object.

    Regards,
    forki
  • Options
    nhsejthnhsejth Member, Microsoft Employee Posts: 34
    Hi
    Sounds like the custom assembly is missing in the run time environment. Remember to deploy the assembly to the Add-ins folder within your servers installation folder. Find the folder that contains Microsoft.Dynamics.Nav.Server.exe and create a subfolder named Add-ins in that folder. Copy your assembly and all dependencies (that does not exist in the GAC) to the Add-ins folder.

    If you want to run the custom assembly client side, you will have to deploy it to teh Add-ins folder relative to the client folder.
    _________________
    Niels-Henrik Sejthen
    Senior Software Developer
    Microsoft Dynamics NAV

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • Options
    jwilderjwilder Member Posts: 263
    Make sure you are using .net 3.5 and not 4.0. 4.0 does not work. I am not sure about versions before 3.5 but I am guessing they would work.
  • Options
    Christian_AbelnChristian_Abeln Member, Microsoft Employee Posts: 42
    Confirmed: Any .NET Version 3.5 and before will work for RTC Add-Ins and .NET Interop solutions.
    .NET 4.0 does not work, because the host process (RTC / Service) is not running on .NET 4.0 in shipping versions of NAV.
    “This posting is provided "AS IS" with no warranties, and confers no rights.”

    Christian Abeln
    Program Manager Microsoft
    Dynamics NAV

    blogs.msdn.com/cabeln/
  • Options
    forki23forki23 Member Posts: 8
    Thanks.

    The problem was indeed that the assembly has to be in Client/Add-In and Service/Add-In.

    Regards,
    Steffen
Sign In or Register to comment.