Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

The referenced page must specify a 'SourceTable'

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.  
  • RustyAustralis Profile Picture
    RustyAustralis 198 on at
    RE: The referenced page must specify a 'SourceTable'

    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. 

  • RE: The referenced page must specify a 'SourceTable'

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

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: The referenced page must specify a 'SourceTable'

    hi

    look this

    learn.microsoft.com/.../devenv-designing-listparts

    DAniele

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,232 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans