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

Deep insert api

(0) ShareShare
ReportReport
Posted on by

Hi,

i have created 2 Pages for Deep insert. If i want get the entries over expand in the Url i get the following error:

Can't find the proberty SalesLine on type 'NAV.SalesOrder'

Here are the pages. Where is my mistake?

URL SalesOrder?$expand=SalesLines

Without expand it works only on SalesOrder API

page 50110 "Doc"
{
    PageType = API;
    Caption = 'Doc';
    APIPublisher = 'Doc';
    APIGroup = 'Flow';
    APIVersion = 'v1.0';
    EntityName = 'Doc';
    EntitySetName = 'Docs';
    SourceTable = header;
    DelayedInsert = true;

    layout
    {
        area(Content)
        {
            repeater(Docs)
            {
                field(id; id)
                {
                    Caption = 'id';
                    ApplicationArea = All;
                }
                field(name; name)
                {
                    Caption = 'name';
                    ApplicationArea = all;

                }
                field("DateTime"; "Date/time")
                {
                    Caption = 'datetime';
                    ApplicationArea = All;
                }

                part(SalesLines; SalesLines)
                {
                    Caption = 'SalesLines', Locked = true;
                    EntityName = 'SalesLine';
                    EntitySetName = 'SalesLines';
                    ApplicationArea = All;
                }
            }
        }
    }
    trigger OnInsertRecord(BelowxRec: Boolean): Boolean
    begin
        Insert(true);
        exit(false);
    end;

    trigger OnDeleteRecord(): Boolean
    begin
        Delete(true);
    end;
}
page 50111 SalesLines
{
    
    Caption = 'SalesLines';
    PageType = ListPart;
    DelayedInsert = true;
    SourceTable = Lines;
    
    layout
    {
        area(Content)
        {
            repeater(General)
            {

                field(lineno; lineno)
                {
                    Caption = 'lineno';
                    ApplicationArea = All;

                }
            }
        }
    }
}
  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at
  • Community Member Profile Picture
    on at

    Hi, the Problem was the entity name. In metadata was it SalesOrderSalesLine. With this call it's running. Now i have a prob with storing in sub page.

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 765 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 571 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 299 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans