Options

Automation variable in NAV 2015 not running with NAS

saurabhabhsaurabhabh Member Posts: 17
edited 2015-09-08 in NAV Three Tier
Hello guys,

I am facing a problem with Automation variable. We had a Automation variable (making use of our COM) in Nav 2009 R2 and we used to run it from Client as well as on Server (using NAS) with out facing any problem.
We use
OK := CREATE(TestAutomationVariable, TRUE, TRUE); //Client COM instance
To create the Automation variable.

We have now upgraded to Nav 2015. With the upgrade we are able to run the Automation variable from Client side but when we try to run it from Server side (using NAS) we are facing an error
Microsoft Dynamics NAV
Microsoft Dynamics NAV Server attempted to issue a client callback to create a Automation variable. Client callbacks are not supported on Microsoft Dynamics NAV Server.

This was running fine on Nav 2009 R2.
Can any one help ?
What is the exact meaning of 'Client Callbacks' ? (I have a general idea - window popups, user input dialog's)
Were client callbacks allowed in Nav 2009 R2 and now in Nav 2015 they have stopped the support? I have read that Nav has stopped support for Server side automation Variable from Nav 2013 . But again we are creating a Client side Automation Variable.

Answers

  • Options
    saurabhabhsaurabhabh Member Posts: 17
    Any ideas guys ??
  • Options
    postsauravpostsaurav Member Posts: 708
    Hi,

    Automation are not supported with NAV 2013 onwards (as per my understanding).

    You need to replace your automation with DotNet Data Type. Even if you face any issues with Dotnet DataType Variable you get an option to RunOnClient which can be set to True.

    you may also like to have a look on -
    https://msdn.microsoft.com/en-us/library/ee909565.aspx

    Hope this helps.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • Options
    SilverXSilverX Member Posts: 134
    For completeness: The difference is, that with 2009 you had a NAS which in fact was a client without UI. In addition, for Classic Client/Classic NAS, the 3rd parameter for CREATE() did nothing, only for RTC.

    Beginning with 2013, NAS is a real server (component) (64-bit) and cannot use Automations anymore. You have to upgrade to .NET type variables.
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Options
    saurabhabhsaurabhabh Member Posts: 17
    Thanks for the reply.

    As SilverX pointed out i did try it with DOTNET datatype of Nav by creating a .net wrapper around my COM.
    It worked fine when running from the RTC with run on Client option set to true.
    But again when this was run from NAS it gave a very similar error as before ( When i was running with Automation variable)

    I tried both for the new .net wrapper which was used through the Nav dotnet variable
    Run on Client : False
    Microsoft Dynamics NAV

    Cannot create an instance of the following .NET Framework object: assembly Saurabhinterop.Object, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a58edc04d4501d54, type Saurabhinterop.Object.Class
    OK

    and Run on Client : True
    Microsoft Dynamics NAV

    Microsoft Dynamics NAV Server attempted to issue a client callback to create a DotNet object: Saurabhinterop.Object.Class (CodeUnit 9012917 Test). Client callbacks are not supported on Microsoft Dynamics NAV Server.
    OK

    And as per my understanding from Nav 2013 the support for only server side Automation as stopped.
  • Options
    SilverXSilverX Member Posts: 134
    You do not need to test client-side variables, they will fail for sure with exactly this exception.

    For the server-side: Do you run your tests in a multi-tier environment? Is the COM and .NET Wrapper installed on the server?
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Options
    saurabhabhsaurabhabh Member Posts: 17
    Do you run your tests in a multi-tier environment?
    - At present every thing is present in the same machine. ( No multi-tier)

    Is the COM and .NET Wrapper installed on the server?
    - Yes the .Net wrapper is installed in the GAC of the server and the COM is also registered in the server machine.

    When you say i do not need to test for the Client-side , what i inferred was that i do not need to test .net wrapper with run on client set to true when running from NAS. Am i correct in understanding this?
  • Options
    SilverXSilverX Member Posts: 134
    When thinking a bit deeper: I assume your COM was compiled for 32-bit, right? The NAV Server is 64-bit and cannot use or even find a 32-bit COM (independent of the wrapper assembly).
    My Suggestion is to completely remove the COM stuff/DLL and (re-)create a new .NET DLL (with the same functionality) and use this one.
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Options
    saurabhabhsaurabhabh Member Posts: 17
    Ok . This may be a possibility our COM is compiled for 32-bit. So it means when we run the COM (buid on 32 bit) from client (RTC) it will work ok but from Server (NAS) it wont, the reason being server is 64 bit and client (RTC) is still 32 bit.

    Is my understanding correct?
  • Options
    SilverXSilverX Member Posts: 134
    Yes :)
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
Sign In or Register to comment.