Hi everyone, i am doing an upgrade from NAV2013r2 to NAV2018. In the old version, I've created a codeunit to manage different connection for an integration with a delivery enterprise. For this, in the procedures of the codeunit, exist different automation variables. In the old server, work perfect, but when I'0m trying o compile this CodeUbnit in NAV2018, in a new server, I get this error: "Cannot obtain information of the type library The type library could be damaged or has an invalid format. Try to register again OLE control or the Automation server" Any hint?
Did you install this old OLE control on the PC with your Development Environment?
How should I do that? I think that is the XML 6.0 automation. The dll is well located in the system32 folder...
If you need to use XML, it's best using DotNet. You can see how to use it (it's very similar to automation) in codeunit 6224 "XML DOM Management", and, if you can, use this "library" to read or write XML documents.
DotNet can run on server, and this is best if you want to use web services or automated tasks through job queue.
Thank you for your answer. Thath could be a solution, but it will be quite a harde job, becasue the codunit is working perfectly, and that solution will extend the upgrade process...
If there is not other solution, i will work on it, but I prefer not to change the CU if it's possible...
In our upgrades we have changed all automations vars to dotnet. But, have you checked this web page:
You have to create all automations this way:
CREATE(AutomationVariable [,True|False] ,True);
The last parameter has to be TRUE always.
You need to register it, so that NAV can see it. If it worked with NAV 2013 R2, then it may work in NAV 2018 too.
But Ponc is right. I would use the dot.net XML component, much better than the old XML ole automation.
Even if it's a big codeunit. And it's not that difficult. Most of the "functions" you have in the automation works 1-to-1 with the similar dot.net component. Or use the the XML DOM management codeunit, then you save a lot of what you otherwise had to do "manually".
Gracias Ponç, I'll work on it. I will take a look to the creation of the Automation, and If the error persists, I'll change the CU...
How should I register it?
As I've said in the earlier message, if the problem persist, I will change the CU.
Thanks for your help!
Maybe a little bit off topic but ...When every you use custom automations in Navision, you should never put them into standard objects. Always create a separate CodeUnit as a wrapper. Then call the wrapper CodeUnit from your C/AL code.The reason for this is two fold. 1/ The issue you have here would be a trivial fix, since you would only have to edit the wrapper CU, everything else would remain the same.2/ If you need to work on the other code, you don't need to have all those automation installed on the client you are using. So it makes it much easier to compile code and to debugg.
What would changing the CU helps? It's an issue in all releases after the introduction of the three tier setup.