Skip to main content

Notifications

Dynamics 365 general forum
Suggested answer

Trigger a workflow based on TIME

Posted on by 97

Hi team,

So I have 2 Entities: Event and Event Schedule

Event has a Start Date and End Date

Event Schedule has Service Start Date/Time and Service End Date/Time.

Event (1) : Event Schedule (N) relationship

I want a workflow to fire off a notification to a user if the Event Schedule Service End TIME is past 8:01 PM. 

How do I get that to work?

Thanks!

  • eSBe Profile Picture
    eSBe 97 on at
    RE: Trigger a workflow based on TIME

    Hi Roohi,

    I was hoping there was a way OOTB to do this. Your suggestion is a good one and I'll give it a shot and update this request.

    Thanks,

    Cheerz!

  • eSBe Profile Picture
    eSBe 97 on at
    RE: Trigger a workflow based on TIME

    Hi Lu,

    The trigger is when the Event Schedule record is created.

    And yes, you're right - the Event entity doesn't have much to do with this.

    So the Event Schedule TIME is what needs to be checked once the record is created.

  • Suggested answer
    Inogic Profile Picture
    Inogic 24,055 on at
    RE: Trigger a workflow based on TIME

    Hi,

    In workflow, there is no OOB way to set a condition on the time part of date time field.

    You can use a trick here,

    Create a new flag field (two option), suppose “Is Time Past” on “Event Schedule” entity.

    Now write a JavaScript that will trigger on change of “Service End Date/Time”.

    Follow JavaScript logic as:

    Set “Is Time Past” to 1 if “Service End Date/Time” > Service End Date with time as 8:01 PM.

    Build a workflow or Power Automate FLOW which triggers on change of “Is Time Past” and your first condition in workflow/FLOW would be “Is Time Past” = 1, if true then fire off a notification to a user.

    Hope this help!

  • LuHao Profile Picture
    LuHao 40,870 on at
    RE: Trigger a workflow based on TIME

    Hi partner,

    It seems that the Event entity does not play any role in this request.

    Also, what's the trigger for this workflow? 

    Generally, workflow triggers have records being created, updated, and deleted.

    pastedimage1616053538979v1.png

  • eSBe Profile Picture
    eSBe 97 on at
    Trigger workflow based on Time

    Hi team,

    So I have 2 Entities: Event and Event Schedule

    Event has a Start Date and End Date

    Event Schedule has Service Start Date/Time and Service End Date/Time.

    Event (1) : Event Schedule (N) relationship

    I want a workflow to fire off a notification to a user if the Event Schedule Service End TIME is past 8:01 PM. 

    How do I get that to work?

    Thanks!

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

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,135 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans