A couple of weeks ago, I suddenly received below exceptions when trying to build a VS2019 solution that I downloaded from Github.
Occasional rantings about Dynamics CRM/365, Power BI and Azure cloud. Taking the first small steps in machine learning, Python and algorithmic trading
Monday, June 21, 2021
Quick tip: don't forget to unblock downloaded source code files when using Visual Studio
Friday, June 18, 2021
Quick tip: submitting web forms to Dataverse using Power Automate Cloud Flows
You can quite easily integrate data coming from forms on your web site with Dataverse using some simple Javascript and Power Automate Cloud Flows.
First step is to create a Power Automate Flow with a "When a HTTP request is received" trigger and add the form fields that you want to capture as JSON payload. Remember to start creating your flow from within a solution so that you can leverage the ALM capabilities of Dataverse and use the new Dataverse connector (current environment)
The request body JSON schema should contain all the web form fields that you want to sent to Dataverse/Dynamics 365 - below is the JSON schema that I generated from a sample payload.
{ "type": "object", "properties": { "firstname": { "type": "string" }, "lastname": { "type": "string" }, "phone": { "type": "string" }, "email": { "type": "string" }, "message": { "type": "string" } } }
function submitform() { var emailvalue = document.getElementById('emailvalue').value; var firstnamevalue = document.getElementById('firstnamevalue').value; var lastnamevalue = document.getElementById('lastnamevalue').value; var phonevalue = document.getElementById('phonevalue').value; var messagevalue = document.getElementById('messagevalue').value; var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST","yourcloudflowurl"); xmlhttp.setRequestHeader("Content-Type","application/json;charset=UTF-8"); xmlhttp.send(JSON.stringify( { firstname: firstnamevalue, lastname: lastnamevalue, phone: phonevalue, email: emailvalue, message: messagevalue } )); alert("Thank you"); }
Wednesday, June 16, 2021
Introduction to the Dual Write framework for Dynamics 365
Summary: The Dynamics 365 Business Applications Platform consists out of a number of different first party apps with CRM (Dynamics 365 Sales & Customer Service) and ERP (Dynamics 365 Supply Chain Management) being core components which typically are used cross industries and sectors in a large number of sectors. The Dual write framework allows for deep integration of Dynamics CRM and F&O.
In most application architectures at companies we have this classical divide between CRM software on the one hand and ERP software on the other hand. Different vendors, technology stacks make it difficult to bridge the divide between the processes and the data models in these core applications.
But from a customer perspective, they don't care about how your application architecture looks like and whether your processes need to cross application boundaries (see simplified schema below)
The Dual Write framework in Dynamics 365 is just one of the different integration mechanisms available in the platform but it probably is the one which provides the deepest level of integration. Dual-write is an out-of-the-box infrastructure that provides near real-time and bi-directional integration between model-driven apps in Dynamics 365 CE (and Dataverse) and Dynamics 365 Finance and Operations. Dual-write provides tightly coupled, bi-directional integration which offers a number of interesting functionalities (but is not necessarily a fit for your scenarios so it is important to do an assessment first of the impact both on sales and customer service processes and financial processes). Changes in CE causes writes to FinOps and changes FinOps causes writes to CE, this automated data flow provides an integrated user experience across the apps. (See Dual write overview in Microsoft docs for more detailed information)
Dual-write was made general available (GA) in March 2020 and has been evolving at a rapid pace with monthly updates - see What's new or changed in dual-write. It consists out of a number of entity maps which are provided out of the box by Microsoft but you can adapt or even extend these entity maps in Dynamics 365 FinOps. In my opinion, the configuration and setup should typically be done by FinOps consultants/architects since the process and data model from ERP is the most complex one but a basic understanding of Dynamics 365 Customer Engagement is quite useful.
Enabling Dual-Write for existing Finance and Operations Apps is quite thoroughly documented but in my personal experience there were still some quirks during the setup that I did not expect (experience from last year):
- Dual write is not supported on trial instances of Finance and Operations Apps (See Microsoft Power Platform Integration > Dual-write setup>System requirements for dual-write)
- Make sure that you meet all the system requirements and complete the prerequisites.
- One of the prerequisites, is installing the Dual Write Core app in Dataverse. This is a quite complex app which will add a whole set of (hidden) solutions to your Dataverse instance
- There are quite a few steps required to complete the setup - luckily the setup wizard in Dynamics 365 FinOps will do a validation whether all steps have been completed successfully.
- After importing the standard entity maps, you will still need to do some additional configuration to make the bi-directional sync work correctly.
- Be also mindful that the person who initially setup the dual-write connection is the only one who can add new table maps. See Troubleshoot dual-write issues in Finance and Operations apps: Error when you link the environment for dual-write or add a new table mapping.
After installing the Dual Write solution on Dataverse (or Dynamics 365 CE) you will see quite a lot of changes that you need to be aware of as a CE consultant or CE solution architect like:
- Enhanced currency functions (FinOps and CE need to have the same currency precision - see Currency data-type migration for dual-write)
- Changes in CRM will be propagated to Dynamics 365 FinOps using a large number of plugins, if a transaction fails in FinOps because of some missing data (or wrong configuration) your changes will not be saved in CRM.
- Introduction of new concepts like company (legal entity in FinOps) & party
- As part of the Integrated customer master, account numbers are now required and need to be filled in. There is no global number sequence across CE and FinOps. You need to handle the autonumbering in both apps and use a common pattern. Accountnumber in CR is mapped to Customer Account number in FinOps, it needs to be unique per legal entity and is the primary key of the customer table in FinOps.
- Exposure to financial and tax data in Dynamics 365 CE e.g. customer groups which are used in FinOps to share characteristics for companies such as payment terms, number of days until invoices are due etc... This is sometimes also used for intercompany invoicing for internal/external customers.
- Advanced pricing and on hand inventory functions
References:
- What gets changed (Technical) in Dynamics365 FinOps with dual-write
- Want to see the inbound and outbound payload for dual-write integration (FinOps perspective)
- Managing dual write - Application Lifecycle management
- Prospect-to-cash in Dual Write (August 2020) webinar recording
- Finance and Supply Chain Management: Dual Write Framework | May 2020 webinar recording
- Dynamics 365 Wave 2 - Field Service & ERP Let's talk integrations by Lucas Diaz recording