Posts

How to Implement Advanced Filtering in Azure Event Grid for More Granular Event Processing

Image
 Azure Event Grid’s advanced filtering capabilities have become a game-changer for developers looking to build precise, dynamic event-driven applications. Previously, filtering options were somewhat limited, but now you can use advanced filters to craft complex rules based on specific event data. This not only makes your event subscriptions more effective but also helps reduce unnecessary processing and enhances the overall system performance. In this post, we’ll dive deep into how to set up and use advanced filtering in Azure Event Grid, along with some examples to illustrate its power. Why Use Advanced Filtering? Event Grid’s advanced filtering allows you to define complex criteria that an event must match before it triggers an event subscription. This means you can fine-tune which events your system should react to, providing you with a way to handle high volumes of events without overwhelming downstream services. Some key benefits include: Granular Control: Tailor subscription...

How to Cancel Dynamics 365 Dataverse Order in 2024: Step-by-Step Guide

Image
There was a request to cancel orders through the Dynamics 365 CRM API. Microsoft does not provide exact documentation on how to do this. It does show which action to call, but not what to send in the body of the request. To be able to do this, you have to call the following action endpoint: {dataverse-url}/CancelSalesOrder {     "OrderClose" : {         "@odata.type" : "#Microsoft.Dynamics.CRM.orderclose" ,         "salesorderid@odata.bind" : "/salesorders({salesorderguid})" },     "Status" : -1 } If you call this endpoint with this body and you place the salesorderguid of the order you want to cancel, the resulting order will be cancelled.

Cancel Ongoing Flow Runs in Microsoft Dynamics 365 Dataverse: Complete Guide

Image
We came across an issue that a lot of flow runs that were accidentally triggered based upon a mutation of a Dataverse/CRM entity action in a specific flow. Microsoft does have a solution to cancel runs using the power automate template ( Power automation cancel bulk template ) However, the issue is that this cancel around 5000 flow runs in 18 hours since there is a delay of around 10 seconds. If you remove the delay, the flow does not give the expected results. Authorization Now the question is how to fix this issue? There is a flow api that allows you to cancel flow runs, but there are some steps to take to be able to do this. Create an app registration in microsoft azure ad/entra with the permission 'Flows.Manage.All' and add the redirect url 'https://global.consent.azure-apim.net/redirect' under Authentication Add a secret to the app registration write this down because you won't be able to see it anymore after creation. In postman create a collection with the au...