Impulz Technologies LLC

Menu
  • Home
  • Products
    • IMPULZ Positive Pay
    • IMPULZ Product unlock
  • Solutions
    • Microsoft Dynamics 365 Finance & Supply Chain Management
    • Microsoft Azure
    • Microsoft Power Platform
      • Power BI
      • Power Apps
  • Services
    • Application Support And Maintenance
    • Azure Cloud Services
    • ISV Development
    • Project Resources
  • About Us
  • Blog
  • Clients
  • Contact Us

Impulz Technologies LLC

Microsoft Dynamics 365 Finance and Operations Business Events

  • Home
  • Blog
  • Uncategorized
  • Microsoft Dynamics 365 Finance and Operations Business Events
  • July 13, 2022July 13, 2022
  • Secured_impulz

Innovate everywhere with intelligent business applications

When we think of Microsoft Business Applications, there is a diverse array of software applications that integrate with each other in perfect harmony. This enables solution architects to organize a perfect solution using the Microsoft platform. As consultants, power users, and decision-makers we should be aware of these technologies and how they can be used to increase productivity in their projects or organizations.

This blog is divided into two parts dedicated to sharing knowledge of D365 Finance and Operations Business events’ introduction to implementation.

In this part, we are discussing business event introduction, categories, and their uses.

Introduction:

Business events provide a mechanism that lets external systems receive notifications from Finance and Operations applications. In this way, the systems can perform business actions in response to the business events.

Business events occur when a business process is executed. During a business process, users who participate in it perform business actions to complete the tasks that make up the business process.

A business action that a user performs can be either a workflow action or a non-workflow action. Approval of a purchase requisition is an example of a workflow action, whereas confirmation of a purchase order is an example of a non-workflow action. Both types of actions can generate business events that external systems can use in integration and notification scenarios.

The main objective of this framework is to send out notifications outside dynamics to tell the external systems that something is happening in dynamics. Now as the name suggests a business event is an event that has a business meaning attached to it.

Example:

Consider a scenario where a sales quotation has been confirmed and it became a sales order. In this situation, you might notice your sales team. That is where you might need to integrate with third-party applications. Instead of writing code or customizing D365 F&O to call those APIs, we can use a business event framework to send out this notification outside D365 F&O, and listeners who are listening to this notification can take some actions which they want to take.

This is the form that displays all the business events in Microsoft Dynamics 365 F&O. List of business events available out of the box, Microsoft added more events with new releases. On the left side are the fields that get sent out in the notification of this business event.

Business event has categories. There are three major categories.

  • Alerts
  • Business Events
  • Workflow

Alerts:

Alerts can be captured as business events and this becomes a very powerful and generic platform because alerts can be configured throughout the application in various forms.

For Example:

Alerts can be captured as due date alerts for example customer invoice is due in three days and you have set up a due date alert. You can actually send out notifications from outside dynamics and the listener can send the SMS to your customer. You do not need to customize such scenarios.

Business Event:

This category is all about the business category for example account receivable, accounts payable, and purchase orders. All these modules have their business events.

Work Flow:

Workflow is a framework within D365 F&O for approval mechanisms and you can send out the workflow notifications from outside the application.

Uses and benefits

Procurement

When you use procurement business events it easy the communication process between the office team and the production team when the production order is created and the floor team will notify by a third-party application so they can speed up the process of production.

Customer master

When a customer is created you can enter the credit limit/due date in the customer master. When an invoice is due then a business event will trigger and notify you on your mobile SMS.

Sales Order

This allows businesses with third-party warehouses application to send the picking information to the system. This can also be used if the warehouse has automated picking machines that determine what is required. This approach puts the responsibility of prioritizing picking and utilization on the external system and simplifies the setup in the application.

How to configure Endpoints

Endpoints are the listeners to these business events. You can configure your endpoints. When you go to configure the endpoint, you will see the list of supported endpoint types. These are the standard available endpoints that can listen to the business events also you can add custom endpoints as well. When a business event occurs and there is an active endpoint the payload gets sent out. In case the endpoints are down it will be captured in the error log.

Create a Business Event Endpoint

Let’s start and set up an “Endpoint” which is where our business event setup will be sent to.

  • Step 1

Open the endpoint tab and click new

Specify the endpoint type. There are many different types of endpoints that the system supports, including sending the messages to AZURE, Microsoft power automate, and a custom https endpoint

For now, I am setting up an HTTPs endpoint. Select HTTPs from the list and then click Next.

Configure Business Event Endpoint

You will fill in the 5 pieces of information on the next form. We will go through each one and how to find their values in the Azure portal.

  • Endpoint name

This is the name of the endpoint, and you can specify whatever you want.

  • Azure Active Directory application ID

Access portal.azure.com and sign in. Go to azure active directory, then registrations.

In the list, select the app that is used by your D365 instance. When the application is open you will see the value next to the application id. It is this value that you need to use in this field.

  • Azure application secret

This field should be populated with the ‘client secret ID‘ of your Azure active directory application found in the previous step. You need to use the value you wrote down when the Azure app registration record was created

  • Key Vault DNS name
  1. From the Azure portal menu, or from the home page, select Create a resource.
  2. In the Search box, enter Key Vault.
  3. From the results list, choose Key Vault.
  4. On the Key Vault section, choose to Create.
  5. In the Create key vault section provide the following information:
    1. Name: A unique name is required.
    2. Subscription: Choose a subscription.
    3. Under Resource Group, choose to Create new and enter a resource group name.
    4. In the Location pull-down menu, choose a location.
    5. Leave the other options to their defaults.
  6. After providing the information above, select Create.
  7. Go to the access policy and provide the desired permissions.

  1. Set the Connectivity method on the ‘Networking’ tab.

 

  1. Review settings and click Create.
  2. Lastly, click on the ‘Overview’ tab of your key value, and copy the value in the ‘DNS Name’ field.  This is the value you will enter into the ‘Key Vault DNS Name’ field when setting up the business event endpoint.
  • Key Vault secret name

If you have not already created a key-value secret, perform the following steps:

Add a Secret to the Azure Key Vault

  1. From the Key Vault click on the Secrets tile.
  2. Under Secrets, select Add.
  3. Under Create a secret, from the list of Upload options, choose an option with which you want to create a secret. Select Manual.
  4. Enter a Name for the secret. The secret name can contain only alphanumeric characters and the hyphen (-) character.  This is the value that you will need to use in the ‘Key vault secret name’ field when setting up the business event endpoint.
  5. Enter the https URL that you would like the business event message to be sent to, in the Value field of the secret.
  6. Select Create to start the deployment.

Go back inside the D365 form, and fill out the ‘Configure new Endpoint’ form with the values you have discovered.  Then click ‘Ok’ to create the endpoint.

You will now see your endpoint listed on the endpoints tab.

Implement the Business Event

As we previously configured the endpoint for D365. Now you will activate the D365 business event and then connect to the endpoint setup. This will cause business event messages to be sent to the endpoints.

Go to

System Administration > Setup > Business events > Business events catalog

Select the business event you want to activate. I have selected the business event Id “SalesInvoicePostedBusinessEvent”.

This will trigger whenever a sales order is invoiced.

Next, select the Activate link’:

A dialogue box will show up. Enter in the legal entity and endpoint that you want the business event to be sent to. Then specify the endpoint name and click Ok.

Select the Active events tab and verify that the business event is indeed activated.

Setup Business Events Batch Job

There are still a few more steps that must be taken in order for the business events to work at all.  By default, they are not enabled in the D365 system.

Go to the ‘Business events parameters’ form in D365

Check the ‘Use business events batch job’ radio button.  The link ‘Business events batch job’ will become visible.  Select the link to open the batch job dialog form.  Fill the dialog and make sure to set up the batch job to run with a re-occurrence.  This job will be responsible for processing the business event messages and sending them out once they are created.  So, for testing purposes, set the re-occurrence to something like 1 minute.

Enable D365 Business Events at the System Level

There is still one more thing needed to enable business events.

Open SQL server management studio and connect to the ‘AxDB’ database.

Then run the following SQL statement:

Update Business Events Parameters set Enabled = 1

Microsoft has a second ‘Enabled’ flag that is not visible on the Business events parameters form, that can only be set through a SQL statement.

Validate the Events are being processed

Now test out the business event functionality. Run the functional process that triggers the business event.  In my case, I activated the business event that will trigger when a sales order is invoiced.  So, we will create an invoice a sales order.

Verify that your business event by checking the table BUSINESSEVENTSCOMMITLOG.

If you check the BUSINESSEVENTSCOMMITLOG table right after you invoice the sales order, you will see a message staged in this table.

Next, depending on the reoccurrence setup, the business events batch job will run and process the records in this table.

If your business event is processed successfully, it will be removed from the BusinessEventsCommitLog table and sent to your endpoint.  If there is an error, the record will still be removed from the BusinessEventsCommitLog table and a new record is created in the BusinessEventsExceptionLog table.

To check the exception, go to the Business Events catalog form in D365, and then click on the Errors tab.  There is an exception message that will tell you what error occurred.

 

Posted in Uncategorized

Recent Posts

  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012
  • Dynamics 365 Finance and Supply Chain: Implement budget check via custom logic

Recent Comments

No comments to show.

Archives

  • April 2024
  • December 2023
  • November 2023
  • October 2023
  • July 2023
  • April 2023
  • February 2023
  • January 2023
  • October 2022
  • September 2022
  • August 2022
  • July 2022

Categories

  • Business
  • Dynamics 365
  • Dynamics 365 Finance and Supply Chain
  • Dynamics AX 2012
  • Introductions
  • Microsoft Azure
  • Microsoft Dataverse
  • Microsoft Power Platform
  • New Technologies
  • Power BI
  • Uncategorized

Latest Post

  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012
  • Dynamics 365 Finance and Supply Chain: Implement budget check via custom logic

Tags

Auto Cost Automation Ax2012 Azure Azure AD Azure Databricks Azure Data Factory Azure Synapse Cost Accounting D365 D365 code management D365 FO Azure DevOps Dataverse Development DevOps Duty Dynamics 365 Finanace and Operations development VM Dynamics 365 Finance and Operations Dynamics 365 Finance and Supply Chain Dynamics 365 FO Security Dynamics 365 with git Dynamics Lifecycle Services Export Freight Full Sync errors Import Item Cost Allocation Landed Cost Lifecycle Services Microsoft Azure Microsoft Dataverse Microsoft dynamics Microsoft Dynamics 365 Microsoft Dynamics 365 Commerce Microsoft Dynamics 365 Finance and Operations Microsoft Dynamics 365 version control Model Driven Apps Power Apps Power Platform Shipment SQL Error Transportation Voyages Web APIs XDS Framework
© Impulz Technologies - All right reserved.