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 :
Small and medium business | Business Central, N...
Suggested Answer

The referenced page must specify a 'SourceTable'

(0) ShareShare
ReportReport
Posted on by

I have a Page that I built for use with PowerBI.  it's an API PageType.  This has been working for several months now but all of a sudden, I'm getting a compile error AL0320 on several page parts.  The error states that the referenced page (also an API PageType) must specify a 'SourceTable'.  However, in all cases the referenced page does specify a SourceTable.  The error is noted on the SubPageLink parameter of the following parts:

                 part(dimensionSetLines; "APIV2 - Dimension Set Lines")
                {
                    Caption = 'Dimension Set Lines';
                    EntityName = 'dimensionSetLine';
                    EntitySetName = 'dimensionSetLines';
                    SubPageLink = "Parent Id" = Field(Id), "Parent Type" = const("Sales Invoice");
                }
                part(salesInvoiceLines; "APIV2 - Sales Invoice Lines")
                {
                    Caption = 'Lines';
                    EntityName = 'salesInvoiceLine';
                    EntitySetName = 'salesInvoiceLines';
                    SubPageLink = "Document Id" = Field(Id);
                }
                part(pdfDocument; "APIV2 - PDF Document")
                {
                    Caption = 'PDF Document';
                    Multiplicity = ZeroOrOne;
                    EntityName = 'pdfDocument';
                    EntitySetName = 'pdfDocument';
                    SubPageLink = "Document Id" = Field(Id), "Document Type" = const("Sales Invoice");
                }
                part(attachments; "APIV2 - Attachments")
                {
                    Caption = 'Attachments';
                    EntityName = 'attachment';
                    EntitySetName = 'attachments';
                    SubPageLink = "Document Id" = Field(Id), "Document Type" = const("Sales Invoice");
                }
                part(customer; "APIV2 - Customers")
                {
                    SubPageLink = "No." = Field("Sell-to Customer No.");
                }
                part(paymentTerms; "APIV2 - Payment Terms")
                {
                    SubPageLink = "id" = field("Payment Terms Id");
                }
Any help is appreciated!
UPDATE:  I rolled back to an older version of my code using Microsoft__Exclude_APIV2__21.0.46256.47234 and this resolved the compilation error on my page.  However when I did another AL:Download Symbols and got version Microsoft__Exclude_APIV2__21.2.49946.51811 the error returned.  Seems to be something related to this newer version of the dependency.  
  • Suggested answer
    DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at
  • MW-31100100-0 Profile Picture
    on at

    Thank you but I'm not seeing anything there that addresses this issue.

  • RustyAustralis Profile Picture
    208 on at

    I got the exact same issue with testing for new 2023 Wave 1 with latest API code file. It is quite bizarre and I can't compile. 

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

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 755 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 413 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 387 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans