Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
Web Hooks were introduced in Dynamics 365 V9. In the documentation for Web hooks, it is recommended to use them with Azure Functions, but what if you have existing Azure WebJobs? For example, WebJobs that are designed as a scheduled service to run complex rollup calculations on recently updated records. With the new Webhooks, you can trigger this straight away when a new record is created instead of having to wait for the schedule. I will demonstrate how to achieve this below.
First, we want to get the WebJobs Web hook URL and the credentials from the Properties of the WebJob in the Azure portal.
Once we have the credentials, we then need to create our authentication header value. To authenticate with the Azure WebJob we are going to use Basic Authentication. For this we first need to have our credentials separated by a colon and then Base64 encode the result. I use the online encoder at https://codebeautify.org/base64-encode to do this.
Then to register the CRM Web Hook we go to Register => Register New Web Hook in the Plugin Registration tool.
This will open the Web Hook Registration screen. On this screen we want to add the Web Jobs Web Hook URL into the Endpoint URL field, and set the Authentication drop-down to HttpHeader. This will display a table where we can add the Http Headers we require. We want to click Add Property and set Authentication as the Key value, and then Basic followed by our base64 encoded credentials.
After saving, we can then register steps against the Web Hook just like creating steps for a plugin. For this example, I will create a step on Create of contact.
Now after creating a contact, we can refresh the Web Jobs page and see that it has successfully triggered the Web Job.
Business Applications communities