Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Journal lines currency

(1) ShareShare
ReportReport
Posted on by 2
Hello, 

we are transferring expense data to Business central and we are using journal lines to do so: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_journalline_create
 
However, there does not seem to be any currency for journal lines. Once a journal lines has been created through the API they end up in the Journal and from within business central they can then be "Posted".
In there, there is a currencyCode that can be set per journal line. There will be instances where different currencies will be used within the same journal and even booked on the same accounts. So the currency would need to be on a indvidiual journal line basis.
 
Is there a way to set this currencyCode from the API? Should we be using some other endpoint / entity / type? 
 
 
Thanks in advance.
  • Suggested answer
    MarceloBorges Profile Picture
    MarceloBorges 114 on at
    Journal lines currency
    Hello,
     
    In my experience with integrating systems with BC, whenever the API cannot accommodate for all the fields that I need, I always look into OData Webservices, as they provide similar functionality as APIs, and for the most part, they don't require customization. All you need to do, is to make sure the page that you need is published as an OData Web Service.
     
    Apparently, OData webservices are a little less performant than APIs, but I prefer to go that route than actually having a developer develop a Custom API -- unless I really need to process massive data on a daily basis.
     
    I've even had integrations in the past where I created part of the records using the standard API, then I complemented the record with additional fiels using the OData Webservice. Of course this is not ideal because you're making 2 calls to BC, but my volume was low enough that this was not a problem.
     
    Here's some documentation on publishing OData webservices:
     
    Sometimes OData has some quirks (just like APIs have its own quirks too), but if you have any questions or issues, let me know.
     
    Good luck!
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 12,920 Most Valuable Professional on at
    Journal lines currency
    Hi
    As our colleague Yun indicates, you should extend the standard api. Here is the standard code and I don't see that it works with the currency code.
    I'll give you some other interesting urls.
    Best
    GR
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,595 Super User 2024 Season 2 on at
    Journal lines currency
    Hi, hope the following helps.
    Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs
     
    Thanks.
    ZHU

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans