Skip to main content

Notifications

Business Central forum
Suggested answer

Journal lines currency

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 112 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 8,379 Super User 2024 Season 2 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 68,242 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

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,186 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,996 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans