Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Checking if real-time workflow was triggered by create or delete

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

Is it possible to determine whether a real-time workflow was triggered by creating a new record or deleting an existing record (if both the 'Start After Record is created' and 'Start Before Record is deleted' are enabled)? Similarly to how it can be done in a Power Automate cloud flow (https://community.dynamics.com/365/f/dynamics-365-general-forum/447916/power-automate---switch-between-change-type). 

 

Do I need to make a separate workflow for each case, or can I implement this logic in a workflow? 

 

Thanks

 

 

Categories:
  • jarod Profile Picture
    4 on at
    Re: Checking if real-time workflow was triggered by create or delete

    Thanks @Ethan_R, I thought that might be the case. I will proceed with making two separate workflows. (I'm trying to avoid custom code / plugins for this solution).

  • Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Checking if real-time workflow was triggered by create or delete

    Hi @jarod ,

     

    You can try having 2 different workflows if you can't determine trigger status as in this case.

    Also, I recommend using Plugins in such case which has higher flexibility and efficient. 

     

    In terms of workflows: Documentation Link

    Ethan_R_0-1685432309974.png

     

     

    Hope this helps

  • jarod Profile Picture
    4 on at
    Re: Checking if real-time workflow was triggered by create or delete

    Hi @Ethan_R, thanks for replying. My question is can you determine specifically the trigger of the real-time workflow using a conditional branch.

    For example, if I had a flow that was triggered to start on both of these two conditions:

    1. Start After a record is created
    2. Start Before a record is deleted

    And in the workflow, I wanted to create a record on a different table (Comment), but the details of that Comment would depend on whether the flow was triggered by a record that was getting deleted, or one that was just created. (i.e. If the record was deleted, I want the Comment to say "{Record Name} was deleted", and if a new record was created, I want the Comment to say "A new record was created, called {Record Name}").

     

    In Power Automate, I know you can determine the metadata about the trigger via the SdkMessage property and thus determine the change type of the Dataverse trigger (such as create, modified, or deleted), as is explained here.

    Thanks

  • Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Checking if real-time workflow was triggered by create or delete

    Hi @jarod ,

     

    As long as real-time is concerned, power automate doesn't offer real-time solution. 

    You can get near real-time or expect delay because execution happens async. 

     

    There's workflows in dataverse that you can use for real-time in some scenarios.

    To understand if a workflow is triggered: You can see run history in 'Process Sessions'

    Ethan_R_0-1685428664293.png

     

    Hope this helps

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics