Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

XMLPort, order of execution

(0) ShareShare
ReportReport
Posted on by

Hi, I'm using am XMLPort for create a three level info in DB (header, lines and details of lines).

I built XML using nested level, but when NAV import it, the execution order of records seems to be incorrect.

NAV fires trigger "Before insert" of header (root level), then for details (last level) and then for lines (middle level).

So for me is impossible keep together details for each line because I haven't glue fields between it.

How can I force NAV to process header, then a line, then all line details, and so on?

Many thanks.

Giorgio

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: XMLPort, order of execution

    Many thanks to both, after some blood I found the solution: simply filter each integer table (used as source for each group) by number = 1 and connect lines with header by number = number; the same done with details/lines couple.

    This is enaugh to assure right process execution: the father, each descendant on next level, each descendant on next level and so on...

    B/R

  • Rashed Profile Picture
    3,765 on at
    RE: XMLPort, order of execution

    change the property of the table to temp.  then at the you can do whatever you want with the temp records and then inert into actual table.   if you need to link the temp records, you can add code on validate of one of the child elements to assign PK fields from parent node

  • Community Member Profile Picture
    on at
    RE: XMLPort, order of execution

    Hi Jonathan, what do you mean with "move middle and last level together" and "process the import by code"?

    I have a nested XML and I'm processing it with XML triggers.

    Where I making a mistake?

    Ok for import it with xml dom, but xml port are more simple to manage and modify.

    B/R

  • Verified answer
    keoma Profile Picture
    32,727 on at
    RE: XMLPort, order of execution

    you could move middle and last level together and process the import by code.

    or you develope your own solution using xml.dom.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans