Monday, September 11, 2017

Common Data Service - Working with Existing Entities






  1. Sing in to https://web.powerapps.com/environments/
  2. If you want to work with an existing environment choose the CDS environment you want to work with. NOTE that Microsoft does not recommend using the default environment. If you need to create a new environment, go to Steps – Create a new CDS Environment.


  1. Click Common Data Service à Entities to see a list of entities in the chosen environment.
 


  1. Click on the chosen entity to view data, export data, or modify it.

 

  1. The Open in Excel option will download an Excel file. You can change data directly in the spreadsheet and publish it back to the CDS entity you are working with.
  2. The Export Data option will download a CSV file along with XML documents.
  3. The Import Data option will give you the ability to import data via CSV. Just keep in mind that the column mapping must be the same as the one you can download.
  4. You can view the data directly in the CDS entity by clicking the Data tab.

  1. Once you have made changes to the chosen entity, you can choose to create or work with an existing project. Please see the  Working with new Projects if you want to create a new one, or Working with existing Projects if you want to modify an existing project.
  2. You may choose to create new entities for the different customizations done to either Sales or Operations. To create a new entity follow  Working with a new CDS Entity.



Common Data Service - D365 for Operations and Sales CDM Integration Setup and Concepts





The following set of posts will discuss the setup, and integration concepts for the Common Data Service. I do want to provide my gratitude to Tribridge for allowing me to be part of a project where the Common Data Service was needed.

In case, you the reader, don't know about the Common Data Service,  in a nutshell "The Common Data Service is the Microsoft Azure–based business application platform that enables you to easily build and extend applications with their business data. The Common Data Service does the heavy lifting of bringing together your data from across the Dynamics 365 family of services so you can focus on building and delivering the apps, insights and process automation that matter to you and your customers with PowerApps, Power BI, and Microsoft Flow."


The content will be divided in small posts, which be accessible from the links below. Please see of the preliminary information we gathered while setting up the environments needed for this project.

Prerequisites

In order to create new Power Apps CDS projects the following is needed:

  1. Global Admin role in an Office 365 tenant where Dynamics 365 for Operations and Dynamics 365 for Sales. 
  2. KB4036524 - This hotfix enables sales order line synchronization with the Data Integration feature from Finance and Operations to Sales..
  3. KB4036461 - This hotfix enables sales order synchronization with the Data Integration feature from Finance and Operations to Sales.
  4. Prospect to cash solution for Dynamics 365 for Sales, version 1.14.0.0 (v14) or later. (https://mbs.microsoft.com/customersource/Global/365Enterprise/downloads/product-releases/MD365FNOPENTProspectToCash). (Done for D365 for Sales Customer Engagement).
  5. Microsoft Dynamics 365 for Finance and Operations, Enterprise edition July 2017 update with Platform update 8 (App 7.2.11792.56024 w/ Platform 7.0.4565.16212). Support for App 7.1 will be added with a hotfix.
  6. Dynamics 365 Sales, Enterprise Edition. The integration solution is compatible with Microsoft Dynamics 365 Customer Engagement Version 1612 (8.2.1.207) (DB 8.2.1.207) online.
  7. An environment in the Common Data Service. The environment must have a database for integration and you must be an environment administrator for that database.

 

Solution Flow

The following is our vision of the entire process (at a very high-level).




Content Links

The following links contain the information we gathered to work with existing environments and entities, environment, connection sets and Projects creation, among others.

Create a new CDS Environment

Create a new Power Apps (CDS) Project

Working with Existing Power Apps (CDS) Projects

Working with Existing CDS Entities

Working with Existing Projects/Tasks Mapping


That's all for now. I'll be adding interesting articles on how to setup each project in CDS.



 

Common Data Service - Working with Existing Power Apps Projects



 
 
 
  • From the below screen you will be able to (1) modify a task map, (2) Schedule project (Continuous auto-execution), and (3) look at the Execution History (This is where you will be able to see errors/warning if they happen).
  • To modify a task map see Working with existing project/task mappings.
  • To create a recurring schedule, click on Scheduling and click the Recur Every radio button. Choose a time frame, a start date, and end date if applicable.
 
 
 
  • To run a project, you can do so from (1) the Scheduling tab, Execution History tab, or (3) from the project list (Click the … button and choose run project).
 
  • To examine a status (Complete/Error/Warning), go to the Execution history either by going into the Project and then clicking the Execution History tab, or by simply the … button and choosing Execution History.

 
 
 

Common Data Service - Create a new CDS Environment





 
 
 
  • From there go to Admin Center, and choose Power Apps.
 
 
 
  • If you want to create a New CDS Environment click Environments à New Environment.
 
 
  • The New Environment form will come up. Add an environment name and set the Region.
 
 
 
  • Click Create environment. This process can take a while. Please note that the new CDS Environment process will create a new CDS Database for you and it is created with sample data. Also, keep in mind that the creation of a new environment uses defaults for the CDS Organization (ORG0001), and it will use the default CRM price list used in both the Products and Sales Order integration templates.
  • If you need to add a new organization, the Organization entity must be updated. To do so, access this link (https://docs.microsoft.com/en-us/common-data-service/entity-reference/dynamics-365-integration) and go to the Preparing the Common Data Service section and follow the instructions on how to update the Organization ID. You will see something like the below:
 
 
 
 

 
 

Common Data Service - Working with Existing Projects/Tasks Mapping




 
 
  • Click in the project name to access its tasks, and then click on a task (i.e. SalesInvoiceHeader).

 
 
  • There are two mapping sections.
    • Source to CDS – i.e. Sales Orders Template, which will move data from D365 for Ops to CDS, and then from CDS to D365 for Sales. The transformations (see below for more info) are done at this stage. This means that if there is data to be transformed from D365 for Ops to D365 for Sales, it will be transformed at the time that is written into CDS, this is done to avoid having two transformations from CDS to Destination.
    • CDS to Destination – The CDS contains the data already transformed and ready to be push to the target system without major data manipulation. Note that the data in CDS can be used to integrate with external systems.
 
 
  • You can create JSON transformations for your data by using the Edit Transformation function. You have 4 choices:
    • Default: Where the Source to CDS explicitly sets a default value to be always the same i.e. ORG001.
    • Truncate: A fixed length i.e. Notes.
    • Value Map: Transforms data from source to system. i.e. Unit of Measure for “Pieces” in D365 for Ops is “pcs”, and in D365 for Sales is “Piece”.
    • Country Region Code: Related to a picklist in CDS for pre-defined mapping of countries.
    • See about mappings and projects in posts stating with Common Data Service Project Setup.

Common Data Service - Create a new Power Apps Project




  • To create a new Power App Project go here https://admin.powerapps.com/dataintegration/
  • In order to create a new Project, you will need to create a new Connection Set (use to authenticate each environment - CDS, Operations, Sales or Customer Engagement). Please note that once you have created a new connection set with the chosen CDS environment, this can be used for other projects as well.
  • Click Data Integration and then New Project.
 
 
 
  • The New Data Integration Project wizards appears. At this point you will be able to provide a Project Name.
 
 
 
  • Select a template. The available templates for Order to Cash are provided by Microsoft, and they provide the integration to move data between D365 for Operations and D365 for Sales, or vice versa. Or, an integration to only move data from the system of record to the CDS. For example, the templates Accounts (Sales to CDS), and Sales Quotes (Sales to CDS) are a good example of a system of record to CDS integration. NOTE: You don’t have to work with the out-of-the-box templates, you can create your own.
  • Click Next, and then choose your connection set.
 
 
 
  • Choose your Organizations. This data comes from connection set configuration.
 
 
 
 
 
  • Finally confirm the project. Once confirmed, you will see your new project under the Projects tabs. To modify, run, schedule, and delete existing projects, please see Steps – Work with existing projects.
  • Once the project is created, you will be able to work on the mappings. For example, you might want to add a new UOM in CRM to comply with the requirements of the Product CDS integration template. For this, you will have to modify existing mappings. For more information see Steps – Working with existing project/task mappings.