Integration using Azure service topics with D365F&O, using Azure functions: a strategy, Part-2



For creating a service bus namespace, topic, subscription and automatic data filtration, please follow my previous blog: https://subsd365.blogspot.com/2023/07/integration-using-azure-service-topics.html

Ok, all set? Let us now explore how to consume the message received from Service bus to D365FO, using Azure Functions. 

Step 1: Creating the Azure function

In your Visual Studio (alternately you can also use Visual Studio Code) -- create new project --> in the template search for  Azure function, the following screen appears:

Select Function = Service Bus Topic Trigger.
Here Topic name is = is the name of my topic which I created in my service bus, subscription name is the name of my subscription which I created.

  
In the Connection String property, just write: sbConStr for now. Will explain what's this in the next point.
Click create to continue.

Step 2: Getting the connection string
To get the connection string, go to Azure Functions --> Shared Access Policies:





 Click on the same. The following screen opens:



Copy the 'Connection string' value by clicking on the highlighted icon. Come back to VS --> Go to LocalSettings.JSON --> Create a new entry called 'sbConStr' as below:


Consequently your code now looks like this:


You can refer to videos for parsing incoming JSON payloads to feed into D365FO from the following video links:
The first session link -https://lnkd.in/dknijQmG
The Second Session link - https://lnkd.in/dphaMR8H

Consequently when I am sending the following message in my Service bus explorer, 
with the label = SalesPool:


It lands successfully in D365FO as:

The console of your VS registers the message you have posted as:


So much for today. See you soon with a new idea. Keep daxing, keep Azuring !!!

 

Comments

Popular posts from this blog

Make your menu items visible on main menu, conditionally,, using this cool feature of D365FO

Are you still using macros? Be sure you read this.

Modifying a DMF data entity query dynamically, from another query, for filteration in D365FO