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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Trying to expands sales lines within sales invoice list using expand keywprd in the api url in business cenrtal cloud

(0) ShareShare
ReportReport
Posted on by 241

Hi Experts,

Hope you all are fine.

I am tring to get sales lines (page: 47) within sales invoice list (page: 9301) in the postman using following url:

api.businesscentral.dynamics.com/.../Company('{Company Name}')/SalesInvoiceList?$expand=SalesLine

I also tried following url:
api.businesscentral.dynamics.com/.../SalesInvoiceList

Can anyone please help me to resolve this issue. Answers will be highly appreciated.

Thanks for reading.

I have the same question (0)
  • GGuerra Profile Picture
    20 on at

    Hi,

    I understand you are using ODATA with PAGE 9301. This page does not have a part with the lines, so you can't achieve your goal without modifying the page.

    You can probably use page 5475 "Sales Invoice Entity" for this. The address, assuming that you publish it with the name "SalesInvoiceList" that is seen on your endpoint, would be the following:

    /SalesInvoiceList?$expand=SalesInvoiceListsalesInvoiceLines

    Anyway, I would recommend using the API instead of ODATA, I leave you the link to the documentation:

    learn.microsoft.com/.../dynamics_salesinvoice_get

  • Abdullah Khalid Profile Picture
    134 on at

    api.businesscentral.dynamics.com/.../salesInvoices

    pastedimage1683657865103v1.png

    This is standard API you can use to expand in API url

  • Suggested answer
    YUN ZHU Profile Picture
    101,643 Super User 2026 Season 1 on at

    Hi, Gonzalo is right. It seems that your understanding of expand method is wrong.

    It can only be expanded when the Part is included in the API page.
    For example:

    https://github.com/microsoft/ALAppExtensions/blob/main/Apps/W1/APIV2/app/src/pages/APIV2SalesInvoices.Page.al

    pastedimage1683678486860v1.png

    So you can try to use the following standard APIs.

    pastedimage1683678600069v2.png

    More details: https://yzhums.com/6117/

    Hope this helps as well.

    Thanks.

    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,273 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,669 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,402

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans