创建使用通用数据服务的流Create a flow that uses the Common Data Service

创建使用通用数据服务的流,通过统一的视图查看业务数据,提高运营效率。Improve operational efficiency with a unified view of business data by creating flow that uses the Common Data Service. 将这个安全的业务数据库部署到组织中,该数据库包含各种格式正确的标准业务实体(例如“销售”、“购买”、“客户服务”和“工作效率”)。Deploy this secure business database that comprises well-formed standard business entities (such as Sales, Purchase, Customer Service, and Productivity) in your organization. 将组织数据存储在一个或多个自定义实体中,后者相对于外部数据源(例如 Microsoft Excel 和 Salesforce)具有多项优势。Store organizational data in one or more custom entities, which offer several benefits over external data sources such as Microsoft Excel and Salesforce.

例如,可以在 Microsoft Flow 中以下述主要方式充分利用通用数据服务:For example, leverage the Common Data Service within Microsoft Flow in these key ways:

  • 创建一个流,以便导入数据、导出数据或根据数据执行操作(例如发送通知)。Create a flow to import data, export data, or take action on top of data (such as sending a notification). 请注意,此方法并非完全同步服务,只是让用户按实体移进或移出数据。Note that this approach isn't a full synchronization service; it simply allows you to move data in or out on a per-entity basis.

    有关详细步骤,请参阅本主题后面的过程。For detailed steps, see the procedures later in this topic.

  • 不必通过电子邮件创建审批循环,只需创建一个流,将审批状态存储在实体中,同时生成一个自定义应用,允许用户在其中批准或拒绝项目即可。Instead of creating an approval loop through email, create a flow that stores approval state in an entity, and build a custom app in which users can approve or reject items.

    有关详细步骤,请参阅使用通用数据服务生成审批循环For detailed steps, see Build an approval loop with the Common Data Service.

先决条件Prerequisites

  • 注册到 Microsoft FlowPowerAppsSign up for Microsoft Flow and PowerApps.

    如果出现问题,请确保 Microsoft FlowPowerApps 支持所用的帐户类型,且组织没有禁用注册。If you have trouble, verify whether Microsoft Flow and PowerApps supports the type of account that you have and your organization hasn't blocked signup.

  • 如果从未用过通用数据服务,请打开 powerapps.com 的“实体”选项卡,然后单击或点击“创建数据库”。If you haven't used the Common Data Service before, open the Entities tab of powerapps.com, and then click or tap Create my database.

登录环境Sign in to your Environment

  1. 打开 Microsoft Flow 门户,然后单击或点击右上角的“登录”。Open the Microsoft Flow portal, and then click or tap Sign in in the upper-right corner.

    注意:可能需要打开左上角菜单才能显示“登录”按钮。Note: you might need to open the top-left menu to show the Sign in button.

    登录

  2. 在右上角菜单中,选择用户在 powerapps.com 中创建数据库的环境。In the top right menu you select the environment that you created the database in powerapps.com.

    注意:如果未选择相同的环境,则将看不到用户的实体。Note: if you do not select the same environment then you will not see your entities.

    选择环境

打开模板Open a template

  1. 在屏幕顶部的“搜索模板”框中,键入或粘贴“通用”,然后按 Enter。In the Search templates box at the top of the screen, type or paste common, and then press Enter.

    搜索模板

  2. 在模板列表中,单击或点击模板,将数据从所需源导入所需实体(或对象)。In the list of templates, click or tap the template that imports data from the source you want into the entity (or object) that you want.

    例如,单击或点击模板,将联系人信息从 Dynamics 365 复制到通用数据服务中。For example, click or tap the template that copies contact information from Dynamics 365 into the Common Data Service.

    选择模板

  3. 单击或点击“使用此模板”。Click or tap Use this template.

    使用模板

  4. 如果尚未创建从 Microsoft Flow 到 Dynamics 365 的连接,可单击或点击“登录”,然后在系统提示时提供凭据。If you haven't already created a connection from Microsoft Flow to Dynamics 365, click or tap Sign in, and then provide your credentials if prompted.

    登录 Dynamics 365

  5. 单击或点击“继续”。Click or tap Continue.

    确认帐户

生成流Build your flow

  1. 在第一张卡片中,指定会触发流的事件。In the first card, specify the event that will trigger the flow.

    例如,用户需要生成一个流,将新的联系人从 Dynamics 365 的实例复制到通用数据服务中。For example, you're building a flow that will copy new contacts from an instance of Dynamics 365 to the Common Data Service. 在“创建记录时”下指定实例,方法是:单击或点击向下箭头,然后单击或点击所显示列表中的选项。Under When a record is created, specify the instance by clicking or tapping the down arrow and then clicking or tapping an option in the list that appears.

    指定 Dynamics 365 的实例

  2. (可选)在屏幕顶部附近,为要创建的流指定其他名称。(optional) Near the top of the screen, specify a different name for the flow that you're creating.

    注意:如果浏览器窗口没有最大化,UI 看起来可能会稍有不同。Note: If your browser window isn't maximized, the UI might look slightly different.

    命名流

  3. 单击或点击“创建流”。Click or tap Create flow.

    注意:如果浏览器窗口没有最大化,可能仅显示复选标记。Note: If your browser window isn't maximized, only the checkmark may appear.

    创建流

现在,在源系统中创建该对象后,系统就会将其导入通用数据服务中。Now, whenever that object is created in the source system, it will be imported into the Common Data Service. 如果找不到所需模板,则可从头开始生成流,让其基于通用数据服务运行。If you can't find a template that does what you need, you can build a flow from scratch that operates on top of the Common Data Service.

用户可以在数据库发生更改时执行相关操作。You can take actions on changes in the database. 例如,可以在数据更改时发送通知邮件。For example, you can send notification mail whenever data changes.