Hi,
I am running tests with the business central api.
Creating the customer goes smoothly, however, when update the customer I get the following error:
JIT loading of field(s): 'Currency Code' failed for table: 'Customer' identification values: 'No.='TCUST'' .
I though it was because my tests was too fast in requesting the data so i ran each call individually with about 5 seconds between each one. I continued to receive the same error, then also tried not including currency code when creating the field but the error persisted.
I am aware that i need to match the etag of the record before updating. (this works fine)
- GET customer (for etag) <-- fails here
- PATCH customer (if-match etag)
There is an event subscriber on the customers table for OnInsert, OnModify and OnDelete for logging purposes.
After creating the customer, fetching the customer in postman works perfectly fine, however when i fetch the customer from the patch request it fails. (patch runs immediately after create)
Events in order
1. POST customer (works)
{
"number": "TCUST",
"displayName": "Test Customer",
"currencyCode": "USD",
"city": "Plano"
}
2. PATCH customer
- GET customer (etag). < fails here
- PATCH customer (if-match etag)
3. DELETE customer (works)