了解 Common Data Service 中的实体Understand entities in the Common Data Service

[!VIDEO nb:cid:UUID:beec68e8-1541-41fb-8fc6-28714ccaca68]

可以使用 Common Data Service 在一组标准实体和自定义实体中安全地存储和管理数据。The Common Data Service allows you to securely store and manage data within a set of standard and custom entities. 实体是一组字段,用于存储数据,类似于在数据库中存储表。An entity is a set of fields used to store data similarly to a table within a database. 存储数据以后,即可通过 Microsoft PowerApps 使用数据生成丰富的应用程序:After your data is stored you can use Microsoft PowerApps to build rich applications using your data:

  • 将数据导入标准实体或自定义实体中。Import data into standard or custom entities.
  • 创建自定义实体,用于支持方案和应用程序。Create custom entities to support your scenario and application.
  • 将自定义字段添加到在其中需要其他信息的标准实体。Add custom fields to standard entities where additional information is needed.
  • 将标准实体和自定义实体纳入正在开发的应用中,就像将数据导入其他源一样简单。Incorporate standard and custom entities into an app that you're developing as easily as you would with data in other sources.
  • 利用生产力外接程序,从 Microsoft Excel 和 Outlook 访问数据。Leverage the productivity add-ins to access your data from Microsoft Excel and Outlook.
  • 对标准实体和自定义实体使用基于角色的安全措施,确保组织中数据的安全。Secure your data within your organization using role-based security against standard and custom entities.
  • 包括预定义数据的选择列表,例如 Country、Salutation 或 Currency。Include picklists of predefined data, such as Country, Salutation, or Currency.
  • 通过对实体和字段名称进行转换,为数据和应用程序提供全局支持。Provide global support for your data and applications by leveraging translation of entity and field names.

每个实体均包含一组可由用户创建、读取、更新和删除的记录。Each entity contains a set of records that users can create, read, update, and delete. 可以创建各实体间的关系,以便在一个实体中可以基于其他实体中的记录查找信息。You can create relationships between entities so that you can look up information in one entity based on a record in another entity. 例如,可以创建一个自定义实体,用于跟踪客户参加过的事件。For example, you could create a custom entity to track events which a customer had attended. 将“客户”作为查找字段添加到自定义实体即可在两个实体之间建立一种关系,这两个实体可以在应用和报告中利用。By adding the Customer to your custom entity as a lookup field, you establish a relationship between the two entities which can be leveraged in your app and in reporting.

若要了解如何购买 Common Data Service 使用套餐,请参阅定价信息For information on purchasing a plan for using the Common Data Service, see Pricing info.

为什么使用实体?Why use entities?

Common Data Service 中的实体,包括标准实体和自定义实体,都可以为数据提供安全的基于云的存储选项。Entities within the Common Data Service, both standard and custom, allow a secure and cloud-based storage option for your data. 可以通过实体创建以业务为中心的定义,对可以在应用中使用的数据进行定义。Entities allow you to create a business-focused definition of your data for use within your apps. 如果不确定实体是否为最佳选择,请考虑以下优势:If you're not sure if entities are your best option, consider these benefits:

  • 易于管理 - 元数据和数据均存储在云中。Easy to manage - Both the metadata and data are stored in the cloud. 无需详细了解如何进行存储。You don't need to worry about the details of how they're stored.
  • 易于共享 - 轻松地与同事共享数据,由 PowerApps 管理权限。Easy to share - You can easily share data with your colleagues because PowerApps manages the permissions.
  • 易于保护 - 安全地存储数据,只有拥有访问权限的用户才能查看数据。Easy to secure - Data is securely stored so that users can see it only if you grant them access. 借助基于角色的安全性,可以控制组织内不同用户对实体的访问权限。Role-based security allows you to control access to entities for different users within your organization.
  • 各种元数据 - 可直接在 PowerApps 中利用数据类型和关系。Rich metadata - Data types and relationships are leveraged directly within PowerApps. 例如,定义字段类型 URL 会以超链接的形式在应用中数显示据。For example, defining a field type URL will present your data as a hyperlink within your app.
  • 实用工具 - 实体适用于 Microsoft Excel 和 Outlook 的外接程序,以提高工作效率,并确保数据可访问性。Productivity tools - Entities are available within the add-ins for Microsoft Excel and Outlook to increase productivity, and ensure your data is accessible.
  • 选项列表 - 包含一系列的标准选择列表,可在实体和应用中实现快速下拉。Picklists - Include picklists from a rich set of standard picklists to provide quick drop downs within your entities and apps.

标准和自定义实体Standard and custom entities

开发应用时,可以使用标准实体、自定义实体或将两者一起使用。When you develop an app, you can use standard entities, custom entities, or both. 如果标准实体在应用中具有特殊用途,则应当使用它,而不是开发一个执行同样操作的自定义实体。If a standard entity can serve a particular purpose in your app, you should use it rather than developing a custom entity that does the same thing. 如果标准实体需要进行几项更改才能发挥特殊用途,可以添加字段以适应需求。If a standard entity would serve a purpose with a few changes, you can add fields to suit your needs.

  • Common Data Service 在默认情况下提供标准实体。The Common Data Service provides standard entities by default. 这些实体根据最佳实践设计,为组织获取最基本的概念,如联系人、帐户和产品。These are designed, in accordance with best practices, to capture the most common concepts for an organization, such as Contacts, Accounts, and Products. 有关实体的完整列表,请参阅标准实体For a full list of entities, see Standard entities.
  • 可以通过创建一个或多个自定义实体来扩展标准实体的功能,存储组织专用信息。You can extend the functionality of standard entities by creating one or more custom entities to store information that's unique to your organization. 有关详细信息,请参阅如何创建自定义实体For more information, see How to create a custom entity.

注意:可能情况下,请使用标准实体(在需要时添加自定义字段)。Note: If possible, use standard entities (with custom fields added, if required). 这样可确保你能够受益于那些在未来利用这些实体的新功能或应用。This will ensure that you can benefit from new features or apps that leverage these entities in the future.

字段Fields

每个字段均包含名称、显示名称、数据类型和一些简单的验证。Each field has a name, display name, data type, and some simple validation. 数据类型包括多种类型,例如 textdatenumberData types include, for example, text, date, or number. 验证可确保必填字段所含数据和记录是唯一的(如果实体对其要求如此)。Validation ensures that required fields contain data and records are unique if the entity requires them to be. 每个字段均包含以下三个类别之一:系统字段、标准字段或自定义字段。Every field falls into one of three categories: system fields, standard fields, or custom fields.

系统字段System fields

所有实体(标准实体或自定义实体)均使用一组只读字段创建,不能对其进行更改、删除或设置为某值。All entities, whether standard or custom, are created with a set of read-only fields that you can't change, delete, or set to a value. 有关详细信息,请参阅 系统和记录标题字段For more information, see System and record title fields. 以下是最重要的系统字段:These are the most important system fields:

  • 创建记录日期 - 创建记录的日期和时间。Created Record Date - The date and time when a record was created.
  • 创建者 - 创建记录的用户。Created By - The user who created the record.
  • 修改记录日期 - 最近修改记录的日期和时间。Modified Record Date - The date and time when a record was most recently modified.
  • 上次修改者 - 最近修改记录的用户。Last Modified By - The user who most recently modified the record.

标准字段Standard fields

每个标准实体均包含一组默认字段,不能对其进行更改或删除。Each standard entity contains a set of default fields that you can't change or delete. 如需实体及其字段的列表,以及选择列表的列表,请参阅 Standard entities(标准实体)。For a list of the entities and their fields, and a list of the picklists, see Standard entities.

自定义字段Custom fields

可以在标准实体或自定义实体中创建自定义字段。You can create custom fields in either a standard entity or a custom entity. 必须指定每个自定义字段的名称、显示名称和数据类型。You must specify the name, display name, and data type of each custom field. 有关受支持类型的完整列表,请参阅 Entity field data types(实体字段数据类型)。For a complete list of supported types, see Entity field data types.

查找关系Lookup relationships

可以在实体中的记录间导航,前提是它们具有被定义为 Lookup 数据类型的字段的关系。You can navigate between records in entities if they have a relationship that's defined as a field of the Lookup data type. 若要创建查找关系,请在一个实体中添加数据类型为 Lookup 的字段,并指向要在其中查找信息的实体。To create a lookup relationship, add a field of data type Lookup in one entity, and point to the entity in which you want to look up information. 有关详细信息,请参阅 通过查找字段的实体关系For more information, see Entity relationships via lookup field.

标准实体Standard entities

如需实体及其字段的列表,以及枚举的列表,请参阅 Standard entities(标准实体)。For a list of the entities and their fields, and a list of the enumerations, see Standard entities.

功能组Functional group 说明Description
客户服务Customer Service “客户服务”实体负责管理客户遇到的问题,包括跟踪、升级和文档处理。The Customer Service entities manage issues from your customers, including tracking, escalation, and documentation.
基金会Foundation 基金会实体所含信息几乎与每个其他实体组相关。The Foundation entities contain information that is relevant to nearly every other entity group. 该组包含诸如地址和货币等实体。This group contains entities such as Address and Currency.
人员、组织和组People, Organizations, and Groups 这些实体包含一组可以与之进行交互的大量人员和组织,包括员工、承办商、捐赠者、志愿者、爱好者、校友和家庭。These entities encompass a rich set of people and organizations that you might interact with, including employees, contractors, donors, volunteers, fans, alumni, and families.
采购Purchasing 可通过采购实体创建采购解决方案。The Purchasing entities let you create purchasing solutions.
销售热线Sales 借助“销售”实体,可以创建端到端销售解决方案,包括跟踪潜在客户和商机、跟进联系人、接受并提交订单以及发送发票。The Sales entities let you create end-to-end sales solutions, from tracking leads and opportunities, to following through with contacts, accepting and delivering orders, and sending invoices.

入门Get started

可以通过使用标准实体创建应用来进行尝试,也可以先创建自定义实体,然后创建使用该实体的应用Try it out by creating an app using a standard entity or create a custom entity, and then create an app that uses that entity.

隐私声明Privacy notice

通过 Microsoft PowerApps 通用数据模型,我们收集自定义实体和字段名称并将其存储在诊断系统中。With the Microsoft PowerApps common data model we collect and store custom entity and field names in our diagnostic systems. 我们利用这一知识来改进我们客户的通用数据模型。We use this knowledge to improve the common data model for our customers. 创建者创建的实体和字段名称帮助我们了解 Microsoft PowerApps 社区中的常见方案,并确定服务标准实体范围中的缺口,如与组织相关的架构。The entity and field names that Creators create help us understand scenarios that are common across the Microsoft PowerApps community and ascertain gaps in the service’s standard entity coverage, such as schemas related to organizations. Microsoft 无法访问或使用数据库表中与这些实体相关联的数据,此类数据也无法在预配了数据库的区域之外进行复制。The data in the database tables associated with these entities is not accessed or used by Microsoft or replicated outside of the region in which the database is provisioned. 不过,请注意,自定义实体和字段名称可能可以进行跨区域复制,并根据我们的数据保留策略进行删除。Note, however, the custom entity and field names may be replicated across regions and are deleted in accordance with our data retention policies. Microsoft 致力于保护你的隐私安全,我们的信任中心对此进行了详述。Microsoft is committed to your privacy as described further in our Trust Center.