Skip to main content
Dynamics 365 general forum
Suggested answer

Does the API's LastXDays take into consideration the Business Closure Days?

editSubscribe (0) ShareShare
ReportReport
Posted on by 15

I have a custom application that is querying the last 7 days worth of records for an entity. The business is closed on public holidays and Saturdays. Assuming I have those days correctly setup in the system as business closure days when I run the query for records modified with the last 7 days, will I get only the non closure days or will it get all calendar days; including the Saturday.

If not, is there a way to enforce this behaviour?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,934 Super User on at
    RE: Does the API's LastXDays take into consideration the Business Closure Days?

    Hi,

    LastXDays in API does not take consideration of business closure setup. You will get all records including created/modified on holidays.

    It can not be enforced via OOB. You might have to write custom code to exclude business closure days records.

    Please mark my answer verified if i were helpful

  • Suggested answer
    Community Member Profile Picture
    Community Member UG Leader on at
    RE: Does the API's LastXDays take into consideration the Business Closure Days?

    If youre using modifed on - last 7 days - you are going to get all days, not just business days/open days.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans