Using DLL in NAV 2017 - Run on client - "true" works fine - but run on client "false" fails

Northw
Member Posts: 5
Hi,
I have written a DLL and installed it in the add-on folders on both my server and my client.
When i try to use the DLL in a codeunit it works fine as long as i define the - run on client property to "true". - but then ofcourse i can't use "with events".
When i set the - "run on client" to false i get an "object reference not set to an instance of an object" error when i try to run my codeunit.
Can anyone explain this difference in behavior when running clientside vs. serverside and have any idea what i can do to be able to run my codeunit with the dotnet variable running server side?
I have written a DLL and installed it in the add-on folders on both my server and my client.
When i try to use the DLL in a codeunit it works fine as long as i define the - run on client property to "true". - but then ofcourse i can't use "with events".
When i set the - "run on client" to false i get an "object reference not set to an instance of an object" error when i try to run my codeunit.
Can anyone explain this difference in behavior when running clientside vs. serverside and have any idea what i can do to be able to run my codeunit with the dotnet variable running server side?
0
Answers
-
Thank you for your answere. But i think you misunderstand my question here. My DLL is not creating any file. My question is about difference in behavior when i tell the DOTNET variable to run either clientside or serverside.0
-
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
I am aware of what the property does. That is not the issue. The problem i have is the when i have it client side it works fine. But when i run it server side i am unable to initiate run the methodes in the DLL. It tells me that the variable has not been initiated.0
-
is your DLL compiled also as x64?Regards
xStepa0 -
The problem may be that if you run it on the client, the client knows where the dll is (because it downloads it) and is able to tell the OS during the initialisation where (in which file) the code base is.
Try to register your dll on the NST server, or add it to the global assembly cache.Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-031
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions