Helaas opnieuw problemen met 24.0.746.
De melding is:
itgenoda061: Syntax error ‘:’ at position 0.
itgenclr217: The remote server returned an error: (400) Bad Request.
URL:
https://start.exactonline.be/api/v1/970600/salesorder/GoodsDeliveryLines?$select=ID%2CCreated%2CCreatorFullName%2CDeliveryDate%2CDescription%2CDivision%2CEntryID%2CItem%2CItemCode%2CItemDescription%2CLineNumber%2CModified%2CModifier%2CModifierFullName%2CNotes%2CQuantityDelivered%2CQuantityOrdered%2CSalesOrderLineID%2CSalesOrderLineNumber%2CSalesOrderNumber%2CBatchNumbers%2CStorageLocation%2CStorageLocationCode%2CStorageLocationDescription%2CTrackingNumber%2CUnitcode&$expand=BatchNumbers&$filte...D+eq+guid%27cd8f698d-bc30-4162-a121-5dad519d366c%27+and+%28%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+6+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+1+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+4+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+5+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+9+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+3+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+2+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+7+or+%3A%3Aancestor.%3A%3Aancestor.LineNumber+eq+8%29
Call stack:
System.Net.WebException
ValidationException
at System.Net.HttpWebRequest.GetResponse()
at Invantive.Data.Providers.Http.HttpBasedProvider.DoRequest(GlobalState owner, ExecutionOptions executionOptions, HttpWebRequest request, String url, ObjectDefinition objectDefinition, QueryObject queryObject, String partitionCode, String callSafeNameOverrule, String anonymizedPostText, Boolean allowRetryOnNoConnectionMade, Boolean allowRetryOnConnectionLoss, ParameterList parameters, Guid nativeCallUid, Boolean throwExceptionOnNonSuccessfulStatusCode, Object requestBody, Int64 timeoutInitialMs, Int64 timeoutMaxOnRetryMs, String resultCacheId, String publicQueryParameters, SqlExecutionStep sqlExecutionStep, ExecutionStatistics& executionStatistics, ODataErrorProcessingInstructions& oDataErrorProcessingInstructions)
Query:
declare
l_workbook excel_workbook;
l_worksheet excel_worksheet;
l_binary blob;
begin
--
-- Create an Excel workbook.
--
l_workbook := excel.new();
--
--
-- Add a worksheet for Exact Online customer labels.
--
l_worksheet := excel.add_worksheet
( l_workbook
, 'LABELS'
);
--
-- Create a list of articles.
--
create or replace table orderlabels@inmemorystorage
as
select sod.YourRef
label 'Customer PO'
, sol.CustomerItemCode
label 'Customer Item'
, sol.ItemCode
label 'KL Item'
, abs(coalesce(gdr.BnrQuantity, gde.QuantityDelivered)) || ' ' || gde.Unitcode AS quantity_delivered
label 'Quantity Delivered'
, gdr.BnrBatchNumber
label 'Batch #'
, sod.DeliverToName
label 'Customer Name'
, gde.Description
label 'Item Description'
, '' AS production_date
label 'Production Dat...dr.EntryId = gde.EntryId
and gdr.LineNumber = gde.LineNumber
where sol.DeliveryStatus in (21 /* Complete */, 20 /* Partial */)
and sol.InvoiceStatus in (12 /* Open */, 20 /* Partial */)
and sol.QuantityDelivered > sol.QuantityInvoiced
and sol.QuantityDelivered > 0
order
by sod.DeliverToName
, gde.StorageLocationCode
, gdr.ItemCode
, gdr.BnrBatchNumber
, sod.YourRef
;
--
-- Place the items in the Excel worksheet.
--
excel.fill_using_query(l_worksheet, 'select * from orderlabels@inmemorystorage');
--
--
-- Retrieve the resulting XLSX-file.
--
l_binary := excel.export_to_xlsx(l_workbook);
--
-- Return the XLSX file to the user.
--
cloud_http.set_response_body_binary(l_binary);
cloud_http.set_response_content_type('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
cloud_http.set_response_header_value('Content-Disposition', 'attachment; filename="ORDER LABELS.xlsx"');
end;