getEntityMainFormDescriptor (客户端 API 参考)

返回指定表的默认主窗体描述符。

Syntax

Xrm.Utility.getEntityMainFormDescriptor(entityName, formId);

参数

Name 类型 必选 Description
entityName String 是的 表的逻辑名称。
formId String 表的窗体 ID。

退货

类型:Promise

说明:返回一个承诺,其中包含具有以下值的默认主窗体描述符。

参数名称 类型 Description
Attributes 字符串数组 主窗体上所有列的列表。
EntityLogicalName String 指定表的逻辑名称。
Id 字符串 指定表的窗体 ID。
Label String 指定表的标签。
Name String 指定表的显示名称。
Sections String 指定表的节名称。
ShowLabel 布尔 指示是否显示指定表的标签。
Visible 布尔 指示窗体是否可见。

Example

以下示例代码演示如何获取指定表的主窗体描述符。

  // Define the table and form ID
  var entityName = "account";
  var formId = "8448b78f-8f42-454e-8e2a-f8196b0419af";

  // Get the main form descriptor 
  Xrm.Utility.getEntityMainFormDescriptor(entityName, formId);

Xrm.Utility