Introduction
Recently, I experienced an issue where I was making some changes to a Power Automate flow that was using a Microsoft Dataverse trigger. The trigger was being activated when a Dynamics CRM Opportunity was modified.
After a bit of testing, I decided that the approach was flawed, so I deleted the trigger, added another Microsoft Dataverse trigger, and updated the table name from Opportunity to be triggered when the Opportunity Sales Process table entity was modified.
All sounds good but you know what the trigger never fired!
Approach
I tried deleting and adding back the trigger but nothing, the flow did not trigger. How odd?! So, i played around for about 20 minutes but nothing.
The hint
Eventually, I changed the trigger so that it would response to the entity being added and modified. (I was getting a bit desperate) then a funny thing happened.
On saving the flow, an error occurred about not being able to find a registration for a webhook related to a modification event. Sorry, I didn’t make a note of the error message. This got me thinking.
My thought was, I wondered if what was happening was an issue under the hood. I expect that when we are adding these activities and triggers webhook and the like are being created on the fly. So how about if this went wrong and when I deleted the original trigger, it did not get updated and it was still there. So, nothing had been unregistered and registered. Therefore, when the new trigger was added it had not been registered either and so this was why there was no modification webhook for the new entity. Anyway, I continued trying things out and then I had a thought, what might update the webhook?
The fix
The fix turned out to be, for the trigger, click on settings and change the settings to the trigger activity (click … -> settings) and set an option. Now, save the flow.
This fixed the issue with the error when saving. I tested out the Power App and changed the business process flow and low and behold the trigger fired!
Anyway, thought I would blog about this in case someone else has the same issue!