De error is reproduceerbaar gemaakt met:
use default
set trace-native-calls true
set log-native-calls-to-disk true
begin transaction
insert into ExactOnlineREST..WarehouseTransfers
( EntryDate
, WarehouseFrom
, WarehouseTo
)
select trunc(sysdateutc)
, whe.id
, whe.id
from ExactOnlineREST..warehouses whe
where whe.Code = '1'
identified
by 'TRANSACTION1'
--
-- Must provide storage location from/to when the source and target
-- warehouse are identical.
--
insert into ExactOnlineREST..WarehouseTransferLines
( Item
, Quantity
, TransferID
, StorageLocationFrom
, StorageLocationTo
)
select itm.id
, 10
, null
, sln.id StorageLocationFrom
, sln.id StorageLocationTo
from exactonlinerest..items itm
join storagelocations sln
where itm.code = 'V001196'
attach
to 'TRANSACTION1'
commit transaction
De native call log is daarna bekeken zoals beschreven op Analyzing large volumes of native call logs on cloud platform APIs. Hier kwam naar voren:
- URL: https://start.exactonline.nl/api/v1/102673/inventory/WarehouseTransfers
- Message: POST
- Message code: itgenoda502
- Success: false
En de volgende body:
{"EntryDate":"2021-11-08T00:00:00+01:00","WarehouseFrom":"4050ceb4-341c-407e-a2b6-7f20429065b3","WarehouseTo":"4050ceb4-341c-407e-a2b6-7f20429065b3"}
De regels van de magazijnverplaatsing zijn - anders dan verwacht met begin transaction
- niet meegestuurd in de JSON.
Ik zal intern navragen waar dit fout gaat en hoe dit opgelost kan worden.