How to Use Common Data Service with Flow

A Common Data Service (CDS) is a cloud service provided by Microsoft that allows you securely store and manage data that’s used by your business applications like Dynamics 365, customer service or sales modules, apps inside Office 365 or SharePoint, and more.

With CDS, you can easily manage your data and metadata because they are stored in cloud. Your data within CDS is secured because you can choose specific users who can only access your data within your organization. The data from your Dynamics 365 apps is also stored within the CDS which allows you to quickly build apps that use your Dynamics 365 data and extend your apps using Microsoft PowerApps.

In this blog, we will talk about how to use a CDS with Flow as shared by technical specialist trainer and developer David Patrick during the Microsoft Flow online conference held this month.

Patrick, who has been working with data for over thirty years, said the greatest reason why he has been using a CDS is because he constantly got into situations where he was asked about list of accounts which had multiple versions of truth.

The good thing about using a centralized Common Data Service is that the entities (accounts, customers, products, etc.) are expected to be found in one place and all of the apps like SharePoint, Dynamics 365, or custom apps will have one version.

Initiate Flow from Common Data Service

You can also use CDS with Microsoft Flow. With a CDS connector, you can create flows that are initiated by create and update events within your CDS database. You can also perform other actions like create, update, retrieve, and delete actions on records within the CDS database.

To initiate your flow in Microsoft Flow, you can use any of these following triggers: when a record is selected, when a record is created, when a record is deleted, and when a record is updated.

Your flow must first gather data triggered from the CDS (specifically the account entity in Dynamics 365), display the information, and move the data into a different application, SharePoint.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

You can start by creating a Flow. If you already have one, simply open and edit it.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

In your Dynamics 365, create a new account (for example, SomeNewAccount), which should automatically generate a flow and copy the data to your SharePoint. Go back to your Flow and click My flows and NewAccounts.

Inside your flow (for example, NewAccounts), you will see a list of the data that are running under Runs. Click the latest data that is running.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

After you clicked the latest data that was running, it is expected to automatically run and create your flow with a trigger (for example, when a record is created) and an action (for example, create item).

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

Go back to your SharePoint site to see the created additional account (for example, SomeNewAccount).

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

Debugging Flow

When you are filling in details for the Create item action, make sure that all the data in trigger and action are accurate to avoid bugs.

One example of a bug is when the Create item action’s body field displays null in the phone information. See photo below.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

The bug is a result of choosing an incorrect data.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

As a result, the phone number doesn’t appear on the SharePoint site.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

To debug, go back to your Flow’s Create item action and replace the phone field with the correct data. Hit Save.

There are also different options in creating flows, and these are: create from templates, create from Visio template, automated-from blank, instant-from blank, and scheduled-from blank.

Screenshot from David Patrick’s demonstration during the Microsoft Flow online conference in September this year.

Aside from creating and running unlimited apps with CDS and premium connectors in PowerApps, automating workflows between apps and services in Flow, and building data model for apps using Common Data Service, you can also connect data to data sources using connectors or with Custom APIs as well as choosing the tools (PowerApps, Microsoft Flow, or CDS SDK) to create the solutions that you need.

In his demo, Patrick shared a couple of reminders for those using Flow. Among his reminders were about making sure that you are in the right environment, not relying so much on Flow checker, fixing bugs in triggers and actions, and selecting the correct entities.

Patrick was among the speakers of the online conference about Microsoft Flow.

The other speakers were the following:

  • Shane Young, “Why I Love Microsoft Flow” (Session 1)
  • Melissa Hubbard, “Getting Started with Flow Approvals” (Session 2)
  • Anton Robbins, “Things to Know Before You Flow” (Session 4)
  • Sean Bugler, “Tell a Better Story with Flow” (Session 5)
  • Elaiza Benitez, “Delaying Emails Based on Time Zone” (Session 6)
  • Daniel Christian, “PowerApps and Flow for Social Media” (Session 7)
  • Tomasz Poszytek, “Scopes and Run After Actions” (Session 8)
  • Sandy Ussia and Daniel Laskewitz, “The Flow Pro Show” (Session 9)
  • Scott Shearer, “Flow for SP Designer Workflow Developers” (Session 10)
  • Sarah Critchley, “Flow, Model Driven Apps & Cognitive Services” (Session 11)
  • Gabriel (Galo) Corvera, “Flow + Teams + Adaptive Cards” (Session 12)
  • Devin Knight, “Power BI Streaming Data sets + Flow” (Session 13)
  • Haniel Croitoru, “You Have an Error in Your Flow? Let’s Deal with It!” (Session 14)
  • Vivek Bavishi, “Sending .vcf Contact Cards with Flow” (Session 15)
  • Joe Unwin, “Getting Started with Custom Connectors in Flow” (Session 16)
  • Geetha Sivasailam, “Microsoft Flow and Azure Dev Ops” (Session 17)
  • John Liu, “5 Keys to make your Flows run Insanely Fast” (Session 18)

There were 29,109 people who registered for the online conference, according to Microsoft Flow senior program manager Jonathon Levesque.

If you would like to watch all the eighteen sessions, click here.

Note: This post has been updated.

Add a Comment

Your email address will not be published. Required fields are marked *