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

Error on GET requests to our api for sales order with lines

(0) ShareShare
ReportReport
Posted on by 88

Hi Experts,

 

When we used our api:

GET http://bcinsider:7048/BC/api/TrueCommerce/TRC/v1.0/companies(f5a0e7d7-55f9-ea11-bb63-000d3a492461)/salesOrders?$expand=salesOrderLines

to send GET requests for the sales order header with sales order lines from BC V17 Sandbox, we ran into the error as this:

{
    "error": {
        "code": "Unknown",
        "message": "Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLTypeMappingException' was thrown.  CorrelationId:  c6893666-0cd5-4eae-b8cb-665b5683886e."
    }
}

for now, only the POST requests to create new orders with lines work on our api, but both GET and POST worked when we were on BC V16.

 

Here is our definition for sales order lines which is called by our api for sales order header.

 

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

And here our api definition for order header:

page 70203543 TRCSalesOrderHeaderAPI
{
    APIVersion = 'v1.0';
    Caption = 'salesOrders', Locked = true;
    ChangeTrackingAllowed = true;
    DelayedInsert = true;
    EntityName = 'salesOrder';
    EntitySetName = 'salesOrders';
    ODataKeyFields = "No.";
    PageType = API;
    APIPublisher = 'TrueCommerce';
    APIGroup = 'TRC';
    SourceTable = "Sales Header";
    Extensible = false;
    Permissions = tabledata "Sales Header" = rimd;
    
    layout
    {
        area(content)
        {
            repeater(Group)
            {
                field(id; Id)
                {
                    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");
                }
                ...
            }
        }
    }
}

We are wondering what this error message means , and how we can resolve this error to make the GET requests work again on our API.

 

Thanks!

Craig

  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    If this used to work with latest 16.x in SaaS then it might be an instability that potentially is resolved with 17.1. Better will be for you to request your CSP Partner to open a request of investigation through Microsoft Support. 

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

#2
YUN ZHU Profile Picture

YUN ZHU 534 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 287 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans