web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Verified answer
    keoma Profile Picture
    32,729 on at

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

    or you develope your own solution using xml.dom.

  • Community Member Profile Picture
    on at

    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

  • Rashed Profile Picture
    3,765 on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans