Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Business Central forum

Without Using DotNet Variables

(0) ShareShare
ReportReport
Posted on by 245

Hello Experts.,

  In AL I replaced DotNet Variable  " ChildNode & FunctionNode as  DotNet System.Xml.XmlNode With  ChildNode  & FunctionNode as XmlNode  "  (I need to Write code without using DotNet Variables that's why I am using XMLNode Type in My code)

and I am Trying to add new element ,but getting error.Please consider below code 

AddNewElement-to-Node.PNG

Can any one Suggest me alternative code for above code.

Thanks in Advance.

Categories:
  • Suggested answer
    Peter Zentner Profile Picture
    390 on at
    RE: Without Using DotNet Variables

    You can find a lot of information in the Microsoft AL documentation about Xml, you can also find answers to similar questions here in the forum. Those questions are answered already.

    There is a bug currently there that produces this issue, however, it is possible to get around this properly: You cannot mix "old technology" with "new technology". So, when you use AL to create your XML Document, you should only use the AL data types and functionality to create the document, add elements and attributes. You should not use the XMLDomManagement codeunit as this is still working with .NET variables and then the bug comes to light.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans