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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to create more than one line for each header in ER

(0) ShareShare
ReportReport
Posted on by 465

So i created a new model and i did this mapping

so if AccountNum 1 has invoice1 and invoice2 and accountNum 2 has Invoice3

i should get 2 headers one for accountNum1 and one for accountNum2 and inside each one is all it's invoices

but instead i'm getting 3 headers AccountNum1 with Invoice1 then AccountNum1 with Invoice2 then AccountNum3 with Invoice3

sth like below, so what did i do wrong?



I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Perhaps your root data source should be CustTable if you want one root element for every customer.

    If your root data source is CustInvoiceJour your will get one root element for every invoice.

  • D365FO user Profile Picture
    465 on at

    Hi Nikolas,

    I tried it as well by doing this mapping:

    but for each customer i'm getting all invoices

    so if AccountNum 1 has invoice1 and invoice2 and accountNum 2 has Invoice3

    I'm getting 2 headers where header1 = AccountNum1  and it has Invoice1,Invoice2 and Invoice3 and header2 = accountNum2 and it has invoice1,invoice2 and invoice3 as well

    sth like this:

    so what's wrong?

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Your relations are wrong.

  • D365FO user Profile Picture
    465 on at

    Hi Nikolas,

    I tried this, but it's still wrong.. right now i'm getting 1 invoice for all customers (and this invoice is the same for all customers) can u help me in the relation??

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    May I ask why do you want it to work like this? You seem to post many questions around sending invoice files, and every time you are working on some new, different approach.

    Why can't each invoice be a separate section in the file? Why do you want to have it grouped by customer?

  • D365FO user Profile Picture
    465 on at

    Hi Nikolas,

    1. I'm trying to learn ER, that's why i would like to know why i'm not getting the desired output. So if you can tell me how to fix it i will appreciate it

    Now as for sending invoices:

    2. I might want to group invoices for certain customers in one file and i might want to send other customers each invoice in one file so it depends on the customer need. So i want to make sure i'll be able to do that in ER, because i was able to do in DMF by some custom code and exporting by code

    3. i want to make a proof of concept, i want to see which is faster ER or DMF

    which is better in terms of performance, speed, usability and tracing if sth goes wrong. which is the better approach for sending lots of invoices?

  • D365FO user Profile Picture
    465 on at

    Any help in fixing the relation?

  • D365FO user Profile Picture
    465 on at

    Hi,

    i want to generate an xml where invoices are grouped by AccountNum. I've tried alot of things but it's not working for me.

    One of the things i tried is this, but i'm getting all invoices in the system under each customer

    what i want is if customer A has invoice1 and invoice2 ... customer B has invoice 3

    This the expected result:

    Customer A

      Invoice1

      Invoice2

    Customer B

      Invoice 3

    Any idea how to do it? i can't find anything on the internet. How to map the data sources to to the model to get the desired result?

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Hi D365FO user,

    you already asked the same question here: community.dynamics.com/.../how-to-create-more-than-one-line-for-each-header-in-er

    Let's continue the discussion in one place to avoid confusion.

    Thanks!

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi D365FO user,

    We have the groupby function. Please have a look at the ER formula reference on MS docs. There are a couple of examples available there.

    Best regards,

    Ludwig

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans