Problem with CREATE on Custom Automation

matttrax
Member Posts: 2,309
This is my first attempt at building a custom .NET (C#) automation. I've tested the functionality from within Visual Studio and it works as intended.
I was able to compile the code into a dll file just fine. I've successfully registered it using regasm and added it to the global cache using gacutil. When I create an automation variable in Navision I can see my object and have no problems. I see the methods I want from within the symbol menu and everything looks great. Everything saves and compiles.
Then I get to CREATE(NavAutomation) and it blows up. Cannot create an instance of GUID ****. I compared the GUID to what I found in Visual Studio for my project and it was the same, just in case I screwed something up there.
I don't understand what's wrong. Usually it will say "Unknown" or something when you look at variables and it can't find the automation. Any ideas? I'll post the code if need be. Thanks.
I was able to compile the code into a dll file just fine. I've successfully registered it using regasm and added it to the global cache using gacutil. When I create an automation variable in Navision I can see my object and have no problems. I see the methods I want from within the symbol menu and everything looks great. Everything saves and compiles.
Then I get to CREATE(NavAutomation) and it blows up. Cannot create an instance of GUID ****. I compared the GUID to what I found in Visual Studio for my project and it was the same, just in case I screwed something up there.
I don't understand what's wrong. Usually it will say "Unknown" or something when you look at variables and it can't find the automation. Any ideas? I'll post the code if need be. Thanks.
0
Answers
-
You can use the Visual Studio to debug the creation process. Just set the fin.exe or finsql.exe as application to start during debug of your project, after the NAV was started, just set breakpoints in the constructor in your dll and run the object in NAV.0
-
0
-
Figured it out. Didn't have a default constructor in there, which I guess CREATE was expecting. With only a constructor to take in parameters it was not happy.
It's been so long since I did OOP. But at least it works now. My first automation is done, and although simple, it's kind of nice getting to do something a little different.
Thanks for your help.0 -
matttrax wrote:Figured it out. Didn't have a default constructor in there, which I guess CREATE was expecting. With only a constructor to take in parameters it was not happy.
It's been so long since I did OOP. But at least it works now. My first automation is done, and although simple, it's kind of nice getting to do something a little different.
Thanks for your help.
Yes, it is new, be prepared to be hooked on it... if you once started to use VS and do something there, it is hard to leave it... :-)
If you know how to make the DLLs, you have new space where you can search for solutions...0
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