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...
Answered

Publish extension Error with API Page in V13 onPrem

(0) ShareShare
ReportReport
Posted on by 140

Hi Experts,

 

I create two pages for deep insert in my extension, and it can be published successfully in my cloud local sandbox container. When I publish it in v13 onPrem environment, it throws error like below.

pastedimage1597228019272v2.png

Does anyone can shed me some lights on how to solve this issue? Does deep insert support in V13 onPrem?

Below are the code for my pages.

page 70203543 TRCSalesOrder
{
    APIVersion = 'v1.0';
    Caption = 'salesOrders', Locked = true;
    ChangeTrackingAllowed = true;
    DelayedInsert = true;
    EntityName = 'salesOrder';
    EntitySetName = 'salesOrders';
    ODataKeyFields = "No.";
    PageType = API;
    APIPublisher = 'xxxx';
    APIGroup = 'xx';
    SourceTable = "Sales Header";


    layout
    {
        area(content)
        {
            repeater(Group)
            {
                field(id; Id)
                {
                    //ApplicationArea = All;
                }
                field("documentType"; "Document Type")
                {
                    //ApplicationArea = All;
                }
                field("number"; "No.")
                {
                    //ApplicationArea = All;
                }

                part(salesOrderLines; 70203542)
                {
                    //ApplicationArea = All;
                    Caption = 'Lines', Locked = true;
                    EntityName = 'salesOrderLine';
                    EntitySetName = 'salesOrderLines';
                    SubPageLink = "Document No." = FIELD("No."), "Document Type" = FIELD("Document Type");
                }
            }
        }
    }

    trigger OnInsertRecord(BelowxRec: Boolean)Boolean
    begin
        Insert(true);
        exit(false);
    end;

    trigger OnDeleteRecord()Boolean
    begin
        Delete(true);
    end;
}

 

page 70203542 TRCSalesOrderLinesAPI
{
    Caption = 'salesOrderLines';
    PageType = ListPart;
    DelayedInsert = true;
    SourceTable = "Sales Line";
    ODataKeyFields = "Document No.";
    AutoSplitKey = true;
    layout

    {
        area(Content)
        {
            repeater(General)
            {
                field("documentType"; "Document Type")
                {
                    ApplicationArea = All;
                }
                field("documentNumber"; "Document No.")
                {
                    ApplicationArea = All;

                }
                field("lineNumber"; "Line No.")
                {
                    ApplicationArea = All;

                }

            }

        }

    }


    trigger OnInsertRecord(BelowxRec: Boolean)Boolean
    begin
        Insert(true);
        exit(false);
    end;

    trigger OnDeleteRecord()Boolean
    begin
        Delete(true);
    end;

    var
        InventoryType: Option;

    trigger OnAfterGetCurrRecord()
    var
        item: Record Item;
    begin
        item.Reset();
        if item.Get(rec."No."then
            InventoryType := item.Type;

    end;

}

Thanks

  • Suggested answer
    srttel Profile Picture
    Microsoft Employee on at

    Hi Denny,

    as a general information BC 13 is out of product life cycle, therefore no changes will be made to this specific version - http://aka.ms/bc13supportend

    I roughly checked this in BC 16 CU3 OnPrem with your code, just changed the sub page form to 46 and it works fine here.

    So you might check it at least in the very last cumulative update of BC 13 with the appropriate vsix file or test on a more current version of Business Central.

    Hope this help at least a little bit.

    Some useful inks:

    Released Cumulative Updates for Microsoft Dynamics 365 Business Central on-premises

    support.microsoft.com/.../released-cumulative-updates-for-microsoft-dynamics-365-business

    Released Updates for Microsoft Dynamics 365 Business Central 2020 Release Wave 1

    support.microsoft.com/.../released-updates-for-microsoft-dynamics-365-business-central-2020

  • Denny1986 Profile Picture
    140 on at

    Hi Sebastian,

    Thank you for your information. Do you mean API page is not support in BC 13?

    What do you mean "changed the sub page form to 46 and it works fine"?

    Could you please explain it more in detail?

    Thanks

  • Verified answer
    srttel Profile Picture
    Microsoft Employee on at

    Please use Caption property without spaces like:

                    field(id; Id)

                    {

                        //ApplicationArea = All;
                        Caption = 'ID';
                    }
    This should resolve the compiler issue.
  • Suggested answer
    Denny1986 Profile Picture
    140 on at

    Thank you, It works.

  • Denny1986 Profile Picture
    140 on at

    Hi Sebastian,

    I find a new problem, If in the Caption, we have number in it, when I publish the extension in the V13 BC,

    It still returns this error. Is there any solution to solve this problem in V13 environment?

    // field("shipToName2"; "Ship-to Name 2")
    // {
    //     ApplicationArea = All;
    //     Caption = 'shipToName2';
    // }

    Thanks

  • Verified answer
    srttel Profile Picture
    Microsoft Employee on at

    Hi Denny,

    I can repro the problem as well in BC 13, but not in BC 16. Seems that this limitation is with BC 13. As this version is out of product life cycle, there will be no more changes to that version.

    I recommend to test this on BC 14 onwards to see if this works for you as well and plan an upgrade to a supported version. 

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 July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 719 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 410 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 369 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans