Notifications
Announcements
No record found.
Hello Anyone,
I want to add multiple name space in XML Node through code in D365 F&O
Please see the below image
How we can achieve this ? Any suggestion.
Hi Mayur,
Could you, please, clarify you create XML file?
Thanks for reply.
See the generated XML
See sample code to generate code
Please try this:
docNode.setAttribute("Cstmr...","http:// ... ... file..xsd");
Hope this helps.
Thnks for reply but in XMLNode setAttribute method is not available
Thanks everyone but in other way i have achieve this functionality.
Hi friend,
Sorry for that I didn't give the declaration of variable.
You can use XmlElement class and you will be able to use it.
You also must provide the default namespace - use createElement2() for that. Here is a complete solution:
XmlElement docNode = doc.createElement2('Document', 'urn:iso:blahblah'); docNode.SetAttribute("xmlns:xsl", "http://www.w3.org/2001/XMLSchema-instance"); doc.appendChild(docNode);
Thnks Martin i don't know your code will be work or not ? but i am using below code.
// generate header details
XmlElement docElement = doc.createElement('Document');
docElement.setAttribute('xmlns:xsi','www.w3.org/.../XMLSchema-instance');
docElement.setAttribute('xmlns','urn:iso:std:iso:20022:tech:xsd:pain.001.001.03');
doc.appendChild(docElement );
Yes, it'll work. Why don't you simply try it?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 664 Most Valuable Professional
André Arnaud de Cal... 522 Super User 2025 Season 2
Sohaib Cheema 303 User Group Leader