Configure Microsoft® Dynamics 365 for AEM Forms
ÃÛ¶¹ÊÓƵ Experience Manager Forms Data Integration provides a cloud service configuration to integrate forms with Microsoft Dynamics server. It enables you to create Form Data Model (FDM) based on the entities, attributes, and services defined in Microsoft Dynamics service. The Form Data Model (FDM) can be used to create Adaptive Forms that interact with Microsoft Dynamics server to enable business workflows. For example:
- Query Microsoft Dynamics server for data and prepopulate Adaptive Forms.
- Write data into Microsoft Dynamics on Adaptive Form submission.
- Write data in Microsoft Dynamics through custom entities defined in Form Data Model (FDM).
AEM as a Cloud Service offers various out of the box submit actions for handling form submissions. You can learn more about these options in the Adaptive Form Submit Action article.
Prerequisites
Before integrating Microsoft® Dynamics 365 with AEM Forms as a Cloud Service, ensure that you have performed the following steps:
-
Set up the account in Microsoft Dynamics 365
Follow the steps explained in the video to set up a Microsoft Dynamics 365 account. In this video, a trial account is created for demonstration purposes.
embed -
Create an account in the Power Platform Admin Center
Create an account in the Power Platform Admin Center to:- Add Dataverse
- Enable Microsoft Dynamics 365 aaplications
Follow the steps in the video to create an account in the Power Platform Admin Center. In this video, a trial account has been created for demonstration purposes.
embed -
Register an application for Microsoft® Dynamics 365 in Azure Active Directory
Follow the steps in the video to register an application for Microsoft® Dynamics 365 in Azure Active Directory.
embed note note NOTE - To create the connected Microsoft® Dynamics 365 application, select Web as the platform and specify the Redirect URI in the following format:
https://'[server]:[port]'/libs/fd/fdm/gui/components/admin/fdmcloudservice/fdm.html
. - Make sure to save the Client ID (also known as the Application ID) and Client secret for future reference.
- To create the connected Microsoft® Dynamics 365 application, select Web as the platform and specify the Redirect URI in the following format:
Connect Forms to Microsoft® Dynamics 365
Once you have configured the prerequisites above, you can proceed with integrating Adaptive Forms with Microsoft® Dynamics 365. To send data to Microsoft® Dynamics 365 on form submission, follow the below steps:
1. Configure cloud service configuration for Microsoft Dynamics
2. Create Form Data Model (FDM)
1. Configure cloud service configuration for Microsoft Dynamics
Perform the following steps to configure the Microsoft® Dynamics 365 cloud service configuration:
-
Navigate to Tools
-
Select a Configuration Container. The configuration is stored in the selected Configuration Container.
-
Click Create.
The Create Data Source Configuration configuration wizard appears.
-
Specify the Title, Name and select Service Type as OData Service.
-
Click Next. The Authentication tab appears.
-
Specify the value for the Service Root field.
Go to your Dynamics instance in the Power Platform Admin Center and navigate to to view the value of the Service Root. The Web API endpoint represents the Service Root value for the Dynamics instance you want to integrate with Adaptive Forms. The Service Root URL is in the following format:
https://<tenant-name>.dynamics.com/api/data/v9.1/
-
Select the Authentication Type as OAuth2.0.
-
Specify the Client ID (referred to as Application ID) and Client Secret for the connected application.
You can retrieve the Client ID and Client Secret from the Azure Active Directory Application. -
Specify the following in the OAuth URL, Refresh Token URL, and Access Token URL fields.
You can retrieve the OAuth URL, Refresh Token URL, and Access Token URL from the Endpoints section of your Azure Active Directory Application. -
Specify
openid
in the Authorization Scope field for authorization process on Microsoft® Dynamics 365. -
Specify the dynamics instance URL in the Resource field to configure Microsoft® Dynamics 365 with a Form Data Model (FDM).
You can copy the Environment URL from the Power Platform Admin Center or derive the Dynamics instance URL using the Service Root URL. The resource URL is in the following format:https://<tenant-name>.dynamics.com
. -
Log in with your Microsoft® Dynamics 365 credentials and accept to allow the cloud service configuration to connect to Microsoft® Dynamics 365 service. If the connection is successful, you are redirected to the Microsoft® Dynamics 365 cloud service configuration page, which displays a success message.
-
Select Create to save the configuration.
2. Create Form Data Model (FDM)
You can use the create the Form Data Model (FDM) using the created Microsoft® Dynamics 365 cloud configuration. Perform the following steps to create Form Data Model:
-
Navigate to ÃÛ¶¹ÊÓƵ Experience Manager > Forms > Data Integrations.
-
Click Create and select Form data Model.
The Create Form Data Model wizard appears.
-
Click Next.
-
Select the created cloud configuration from the Select Datasource tab.
-
Click the Edit
Next, you can configure the Form Data Model (FDM) and use it in various Adaptive Form use cases, such as:
- Prefill Adaptive Form by querying information from Microsoft Dynamics entities and services
- Invoke Microsoft Dynamics server operations defined in a Form Data Model (FDM) using Adaptive Form rules
- Write submitted form data to Microsoft Dynamics entities
- You can configure the Form Data Model Submit Action for an Adaptive Form to send data to Microsoft Dynamics.
You can then use the Submit using Form Data Model (FDM) option in an Adaptive Form to transfer data from your form to the configured Microsoft® Dynamics 365.