Hi all,
We are writing a API-Type-Query in our extension code to expose all items' inventory quantity under each locations seperately by one request only,
after we published the extension to test this query, we got a error like this:
---
{
"error": {
"code": "Unknown",
"message": "The following SQL error was unexpected:\r\nInvalid column name 'Location Filter'.\r\nStatement(s) could not be prepared.\r\n CorrelationId: 72cdcaa7-ff3e-4918-b6f7-31997dc52325."
}
}
---
Here is our code:
---
query 70203509 TRCItemInventoryLocationAPI
{
QueryType = API;
APIPublisher = 'TrueCommerce';
APIGroup = 'TRC';
APIVersion = 'v1.0';
EntityName = 'itemInventoryQuantity';
EntitySetName = 'itemInventoryQuantities';
elements
{
dataitem(Location; Location)
{
column(Code; Code)
{
}
dataitem(Item; Item)
{
DataItemLink = "Location Filter" = Location.Code;
column(itemNo; "No.")
{
}
column(Inventory; Inventory)
{
}
}
}
}
var
myInt: Integer;
trigger OnBeforeOpen()
begin
end;
}
---
We are wondering if there could be a way to make this query work,
or if there is any other solution to get all items' inventory quantity under each locations seperately by sending only one request.
Thanks!