Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

JIT loading of fields ERROR

Posted on by Microsoft Employee

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)

Categories:
  • Jameswick Profile Picture
    Jameswick 55 on at
    RE: JIT loading of fields ERROR

    I don't know the exact answer but check these reasons may help you.

    A JIT load may fail for multiple reasons, like:

    The record has been modified between the original load and the subsequent JIT load.

    The record has been deleted between the original load and the subsequent JIT load.

    The record has been renamed between the original load and the subsequent JIT load.

    Regards,

    J Wick

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: JIT loading of fields ERROR

    Amazing! Thank you. Interesting how the same formatting works for other endpoints though.

  • Verified answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: JIT loading of fields ERROR

    Hello,

    Most likely the format of the etag is wrong. You can use * instead.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans