Skip to main content

Notifications

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

how to get foreign Holidays into BC, so purchasing can better estimate the lead times?

Posted on by 350

Hi there,

i search for a way to get national holidays from foreign countries into BC. For example, when we send a Purchase Order to a business in france, it would be nice if BC would automagically account for their national holiday on July 14th.

I tried adding other Base Calendars, but i did not find a way to get the entries automatically synced from somewhere. It is way too tedious for us to maintain this manually. Isn't there something more convenient?

Is it maybe the wrong approach? What is best practice here?

Categories:
  • Suggested answer
    NAV_with_Narang Profile Picture
    NAV_with_Narang 2,234 Super User 2024 Season 1 on at
    RE: how to get foreign Holidays into BC, so purchasing can better estimate the lead times?

    Hi - You can leverage some assistance from a BC Developer, if you are one, do follow:

    1. You'll have to do an API integration which will fetch data into Business central, once a year. Make sure to have a provision to delete all data for years gone by

    2. You can use https://www.abstractapi.com/api/holidays-api to fetch all the data into a custom staging table into Business Central. Or use a similar link. These APIs will either accept JSON or in many cases XML Requests. There are plenty of blogs out there to guide you on both formats

    3. Now you need a provision to make sure correct country code is entered into the PO/PQ. You can use any default fields available or create a custom one of your own. Either way make sure you have data in this particular field

    4. Next, write a subscriber on the "Email" button of a purchase order/quote which will check (1) If your PO/PQ's country matches with any country code in your custom table & (2) then check if Today's date is a holiday in that country (3) If today is a holiday, showcase a confirmation message or an error

    5. End

    This task above is time consuming to say the least. Only if it adds value go for it and develop an extension in Business Central. Do let the community know if you need any assistance with the AL code

    Alternatively, since all emails from BC are sent from a designated outlook/office365 account, check if similar "global holiday" setting configuration is available via your Exchange Server or Outlook Server. There may be apps there to assist you with this on outlook itself, which will consume less time

    Do verify the answer by clicking "YES" for "Did this answer your question" - if you feel it helped you in anyway, so that others can get benefit out of it too. Thankyou very much for taking out time to read

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans