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 :
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
    95,718 Super User 2025 Season 2 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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,664

#2
YUN ZHU Profile Picture

YUN ZHU 960 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans