web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

PATCHing journalLines via REST clears currencyCode and currencyFactor

(7) ShareShare
ReportReport
Posted on by 21

Environment: Production (also reproducible in Sandbox)

API version: v2.0

Endpoint used (REST): PATCH https://api.businesscentral.dynamics.com/v2.0/Production/api/v2.0/companies({companyId})/journals({journalId})/journalLines({journalLineId})

 

Expected behavior

currencyCode and currencyFactor should remain unchanged when updating the accountId on a journal line.

 

Actual behavior

Both fields are cleared when accountId is included in the PATCH request.

If accountId is omitted, the currency fields remain untouched.

 

Additional details

We PATCH via REST API, but we GET via OData (the OData response includes currencyCode and currencyFactor).

This issue was not occurring until recently, suggesting a potential behavior change or regression.

 

Question

Is this expected behavior for the REST API when updating accountId, or is it an unintended regression in the journalLines endpoint?


 

Request body:

{
  id: "165941b4-a3b6-f011-bbd1-000d3a74ff9a",
  accountNumber: "18200",
  accountType: "Bank Account",
  description: "Account updated to bank account",
  amount: -55,
}


journalLine (fetched through OData endpoint) after the response:

{
  id: "xxx",
  journalTemplateName: "GENERAL",
  lineNumber: 608888208,
  accountType: "Bank Account",
  accountNumber: "CHECKING",
  postingDate: "2025-10-31",
  documentType: " ",
  documentNumber: "1BDB1DB4",
  description: "Account updated to bank account",
  vatPercent: 0,
  balAccountNumber: "",
  currencyCode: "",
  amount: -55,
  debitAmount: 0,
  creditAmount: 55,
  amountLcy: -55,
  balanceLcy: -55,
  currencyFactor: 0,
  RTRCurrencyFactorAPI: 0,
  //fields omitted for brevity
}
I have the same question (0)
  • Suggested answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at
    Hi,
     
    According to the standard behavior, when you update the Account No. via API, the system will clear the Currency Code if there’s no Balancing Account defined for that G/L line.
     
     
     
    Try adding Balancing account in the PATCH, or add balancing account before using PATCH and check if this works.
     
    Hope this helps.
    Aman K
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,803 Super User 2026 Season 1 on at
    Hello,
     
    This is not expected, it’s a likely regression.
    PATCH should only change fields you send, but updating accountId now resets currencyCode and currencyFactor.
     
    Workaround: skip accountId unless needed, or resend currency fields.
     
    Regards,
    Oussama Sabbouh
  • EY-31101544-0 Profile Picture
    21 on at

    Hey, thanks for the suggestions!

     

    For the first one — adding a balancing account didn’t resolve the issue, and since my journalLines normally don’t include one, adding it just as a workaround wouldn’t really fit our setup.

     

    For the second one — the REST endpoint doesn’t accept currency fields, and when sending them through the OData custom endpoint they still get cleared out. This behavior wasn’t present until recently — was this change introduced in a recent update or is it a confirmed regression? If it is, are there any plans to address or fix this?

    Thanks!
    Best regards

  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    Hi, Did you set a template? Or you could try using the template function to solve this.
     
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans