Automation problem on "Update Pages for Style Sheets"
Boom-Box
Member Posts: 27
Hi all,
I am using Nav 2009 R1 and, when trying to use codeunit 50000 "Update Pages for Style Sheets" provided by microsoft, although all automations are visible, published and recognized by NAV, both in NAV Server and in my computer, when using the following code:
i get the error:
Although this is a very regular sbject in this forum, i haven't been able to find an answer to this problem. i already tried deleting and creating the variables and reattributing the automation services.
Any hint on what this can be?
Thank you for your help!
I am using Nav 2009 R1 and, when trying to use codeunit 50000 "Update Pages for Style Sheets" provided by microsoft, although all automations are visible, published and recognized by NAV, both in NAV Server and in my computer, when using the following code:
IF IS CLEAR(AttributeNode) THEN CREATE(AttributeNode);
i get the error:
This message is for C/AL programmers:
Could not create an instance of the OLE control or Automation server identified by
GUID={F5078F18-C551-11D3-89B9-0000F81FE221} 6.0:{2933BF85-7B36-11D2-B20E-00C04F983E60}:'Microsoft XML, v6.0'.IXMLDOMAttribute.
Check that the OLE control or Automation server is correctly installed and registered.
Although this is a very regular sbject in this forum, i haven't been able to find an answer to this problem. i already tried deleting and creating the variables and reattributing the automation services.
Any hint on what this can be?
Thank you for your help!
0
Comments
-
This to me looks like a modification not done correctly.
I believe Nodes are not created but rather the MSDOM creates the node and assigns it to AttributeNode
MSDOM.setAttributeNodeNS('attrnode');
AttributeNode := MSDOM.getAttributeNodeNS(attrnode);0 -
Hi Rashed, thank you for your answer.
I only put that code because the error I was getting before was the 'classic'
This message is for C/AL programmers:
This Automation variable has not been instantiated.
You can instantiate it by either creating or assigning it.
The original code is Microsoft, as follows:ProcessPages(PageNode : Automation "'Microsoft XML, v6.0'.IXMLDOMNode") ChildNodeList := PageNode.childNodes; IF ChildNodeList.length > 0 THEN BEGIN MaxChildNodeCount := ChildNodeList.length; CLEAR(ActionsFound); FOR ChildNodeCount := 1 TO MaxChildNodeCount DO BEGIN PageChildNode := ChildNodeList.item(ChildNodeCount-1); NodeName := PageChildNode.nodeName; IF PageChildNode.nodeName = 'Properties' THEN ValidPageType := ValidatePageType(PageChildNode); IF PageChildNode.nodeName = 'SourceObject' THEN ValidSourceTable := ValidateSourceTable(PageChildNode); IF PageChildNode.nodeName = 'Actions' THEN BEGIN IF (NOT ValidPageType) OR (NOT ValidSourceTable) THEN EXIT; ActionsFound := TRUE; ProcessActions(PageChildNode); AttributeList := PageNode.attributes; AttributeNode := AttributeList.getNamedItem('VersionList'); VersionList := AttributeNode.text; IF (STRLEN(VersionList) <= (MAXSTRLEN(VersionList) - STRLEN(StyleSheetVersion) + 1)) AND (STRPOS(VersionList,StyleSheetVersion) = 0) THEN AttributeNode.text(VersionList + ',' + StyleSheetVersion); END; END; IF NOT ActionsFound THEN CreateActions(PageChildNode); END;
Thank you for your help0 -
Which line in the code does it error out?
My guess the xml file is malformed or doesn't have the Node expected and thus lines like below
ChildNodeList := PageNode.childNodes;
return null. So ChildNodeList is uninitialized.0 -
the error is in the line:
AttributeNode := AttributeList.getNamedItem('VersionList');
that is the reason why i wrote theIF IS CLEAR(AttributeNode) THEN CREATE(AttributeNode);
in the first place...0 -
But you can create the Node and what is it pointing to?
Your xml file does not have node. Find out why.
Save the xml file to text and take a look at it.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
- 322 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
