Hi all,
in Dynamics NAV 2009, if you set an XML port to be used in RTC with Format property set to Variable text, is it possible to create dependent nodes in the same XML dataport of type table? :-k
I'm asking this question as I tried to create such nodes (eg. Customer and Customer ledger entry) and the following error is being displayed: "An element with source type Table cannot have Table element children".
If Format property is changed to XML, this same setup works correctly.
Any ideas how this can be solved!!
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
first of all thanks for your reply. However when I tried this option the system displayed the following error: "If element has source type table, then it cannot have grandchildren". What I tried was:
Customer - element - table - Indentation1
CustLedEntries - ( both attribute and element) - text - Indentation2
CustLedEntry - element - table - Indentation3
I've also tried other alternatives without any success. These errors do show up only when the XML Port format property is set to either Variable Text or Fixed Text!!
Am I doing something wrong?
any ideas about this issue #-o
Are xml ports with the new format property being used extensively??
Thanks for all suggestions
Bumped into the same problem! Even more - VariableText and FixedText formats are not working when you run XMLPorts from Classic Client - so you have to call the XMLPort from RTC to make sure it exports data in those formats.
But I *almost* made it work by implementing the structure in the attachment. I built it on two Integer tables and doing all filtering and navigation through recordsets in C/AL at OnPreXMLItem and OnAfterGetRecord triggers.
First Integer table has SourceTableView set to WHERE(Number=CONST(1)) second - not limited.
The reason I am saying *almost* - still need to debug C/AL part to make it work properly for all scenarios - have a couple of minor glitches there. But I have to run now - so I am giving you what I have so you could play with it if it is urgent. Otherwise - I will post working example on Monday.
Codeunit XML Port Runner
XML Port Export Sales Order (Format: FixedText, all Width properties for the fields are set to 10)
And code lines like these at all Export::OnBeforePassVariable triggets:
And here is what I get when I run this codeunit from RTC:
Best regards,
DMC
And since you cannot indent Dataitems, you have to filter the lines at OnPreXMLItem trigger. In my example I use Source Type = Text, but Field is also supported.
Below you can see the settings I used for an XMLPort with Variable Text format (semicolon separated) – they are quite different from default.