Mike Scally
Mike Scally

Reputation: 1

Business Central API - Create Custom API Page for Sales Invoice Lines

I need to create a custom API Page for Business Central on Dynamics 365. I need to get a the AL source for the API Method

https://api.businesscentral.dynamics.com/v2.0/{{TenantID}}/{{Environment}}/api/beta/companies({{CompanyId}})//salesInvoices({{InvoiceId}})/salesInvoiceLines

Does anyone know where I can find the AL source for the SalesInvoiceLines method above?

I have copied the AL source from my Docker Windows Container to a directory C:\bcSandbox\applications\APIV1\Source_Exclude_APIV1_.Source

I can only find the AL source for a ListPart for the SalesInvoiceLines (see below), I may be wrong but not sure how I can POST new records to BC using a ListPart.

page 20043 "APIV1 - Sales Invoice Lines"
{
    DelayedInsert = true;
    PageType = ListPart;
    SourceTable = "Sales Invoice Line Aggregate";
    SourceTableTemporary = true;
    ODataKeyFields = Id;
    Extensible = false;

Upvotes: 0

Views: 1381

Answers (1)

Robert Kirsten
Robert Kirsten

Reputation: 494

The business central standard objects are the pages 5475 (SI header) and 5476 (SI line), which you'll find within the base application (Microsoft_Application_*.app).

Upvotes: 0

Related Questions