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

Report
All responses (
Answers (