web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

$expand filter is not working for F&O ODATA for SalesInvoice

(1) ShareShare
ReportReport
Posted on by 84
Hello,
 
I am trying to use an ODATA $expand filter to get a full invoice with Header and line but it's not working but same filter working for sales order
 
 
 
Does anyone know what is the issue here?
  • Martin Dráb Profile Picture
    241,637 Most Valuable Professional on at
    I don't know if it makes any difference, but I don't think you should be using SalesInvoiceV2Lines. This entity is deprecated and replaced with SalesInvoiceV3Lines.
  • RC-27040918-0 Profile Picture
    84 on at
    Hi Martin Dráb,
     
    No SalesInvoiceV3Lines entity is also not working.
     
    Does anyone know if there is any extra configuration needed from my side or it's problem in $expand filter?
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    308,227 Super User 2026 Season 2 on at
    Hi,
     
    It isn't an issue with the $expand filter. I think it is an issue with the entity key on the invoice header. This now has three fields where the relation on the invoice lines only has the InvoiceNumber field. 
    I have seen this on another entity before and at that time created copies of the entities having only one field on the entity key of the header, where the relation on the line was also matching the same field.
  • RC-27040918-0 Profile Picture
    84 on at
    Hello,
     
    Do you think the problem happened because of I am using a trial account?
  • Layan Jwei Profile Picture
    8,428 Super User 2026 Season 2 on at
    Hi Community member,

    it's not because of the trial account. I just tried it myself and i got the same behaviour. It worked for sales orders but it didn't work for SalesInvoiceV2Lines.

    I will need to Investigate when I have the time and get back to you

    Thanks,
    Layan Jweihan
  • André Arnaud de Calavon Profile Picture
    308,227 Super User 2026 Season 2 on at
    Hi,
     
    As Layan mentioned it is not due to a trial account.
     
    I now created copies of the invoice entities and checked my comments below. It is indeed as I can remember. I got it working when the entity key on the header was reduced to 1 field that matched the field name on the entity relation from the line entity to the header.
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 271 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 217

#3
Subra Profile Picture

Subra 200 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans