Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Trigger a workflow based on TIME

(0) ShareShare
ReportReport
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,106 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,872 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans