<CrmParameter> (RibbonDiffXml)

应用到: CRM 2016 on-prem, CRM Online

表示是从 Microsoft Dynamics CRM 应用程序中检索的数据,该数据可作为参数传递。

语法

<CrmParameter
 Name = “String”
 Value= ["CommandProperties" |
         "PrimaryEntityTypeCode" |
         "PrimaryEntityTypeName" |
         "PrimaryItemIds" |
         "FirstPrimaryItemId" |
         "PrimaryControl" |
         "PrimaryControlId" |
         "SelectedEntityTypeCode" |
         "SelectedEntityTypeName" |
         "FirstSelectedItemId" |
         "SelectedControl" |
         "SelectedControlSelectedItemCount" |
         "SelectedControlSelectedItemIds" |
         "SelectedControlSelectedItemReferences" |
         "SelectedControlAllItemCount" |
         "SelectedControlAllItemIds" |
         "SelectedControlAllItemReferences" |
         "SelectedControlUnselectedItemCount" |
         "SelectedControlUnselectedItemIds" |
         "SelectedControlUnselectedItemReferences" |
         "OrgName" |
         "OrgLcid" |
         "UserLcid"]
 />

属性和元素

The following table lists the attributes, child elements, and parent elements.

属性

Attribute Description Type Usage

Name

表示在使用 Url 元素时为此值传递的查询字符串参数的名称。

Represents the name of a query string parameter passed using the <Url> (RibbonDiffXml) element.

String

See Remarks

Value

指定要作为参数传递的值。

Valid values:

 

Value Description

CommandProperties

一个对象,其包含以下三个属性:SourceControlId、CommandValueId 和 MenuItemId

  • SourceControlId : The Id value of the Ribbon control that initiated the event.

  • CommandValueId : A string that is sent with the command event when a button is clicked.

  • MenuItemId: A reference from a control to the Id of a menu item.

Most entities will not return a MenuItemId value. Only the following entities will return this value:

  • BusinessUnit

  • Connection

  • CustomerAddress

  • Equipment

  • Goal

  • InvoiceDetail

  • Mailbox

  • MailMergeTemplate

  • PartnerApplication

  • QueueItem

  • QuoteDetail

  • RoutingRuleItem

  • SalesOrderDetail

  • ServiceAppointment

  • SharePointDocumentLocation

  • SharePointSite

  • Territory

PrimaryEntityTypeCode

一个数字,表示特定 Microsoft CRM 部署的实体的唯一类型。

PrimaryEntityTypeName

一个表示实体的唯一名称的字符串。

PrimaryItemIds

一个字符串数组,用于提供主要项目的 GUID ID 值。

FirstPrimaryItemId

提供一个 GUID 标识符作为要查看的记录的字符串。

PrimaryControl

一个对象,用于引用在执行功能区命令操作时具有焦点的控件。

PrimaryControlId

一个提供具有焦点的控件的 ID 值的字符串。

SelectedEntityTypeCode

一个数字,表示网格中选定的记录的实体的唯一类型。实体类型代码将因部署而异。

SelectedEntityTypeName

一个字符串,表示网格中选定的记录的实体的唯一名称。

FirstSelectedItemId

为网格中选定的第一个项提供一个字符串形式的 GUID 标识符。

SelectedControl

一个对象,用于引用在执行功能区命令操作时具有焦点的控件。

SelectedControlSelectedItemCount

网格中选定项的数目。

SelectedControlSelectedItemIds

网格中所有选定项的 GUID ID 值的字符串数组。

SelectedControlSelectedItemReferences

一个 EntityReference 对象数组,这些对象表示网格中的所有选定项。

This option is only available when used with the <JavaScriptFunction> (RibbonDiffXml) element.

SelectedControlAllItemCount

一个数字,表示网格中显示的总项数。

SelectedControlAllItemIds

一个为网格中显示的所有项提供 GUID ID 值的字符串数组。

SelectedControlAllItemReferences

一个 EntityReference 对象数组,表示网格中的所有项。

This option is only available when used with the <JavaScriptFunction> (RibbonDiffXml) element.

SelectedControlUnselectedItemCount

网格中未选定的项的数目。

SelectedControlUnselectedItemIds

用于网格中所有未选定项的 GUID ID 值的字符串数组。

SelectedControlUnselectedItemReferences

一个 EntityReference 对象数组,表示网格中所有未选定的项。

This option is only available when used with the <JavaScriptFunction> (RibbonDiffXml) element.

OrgName

组织的名称。

OrgLcid

表示组织的基本语言的语言代码。

UserLcid

表示用户选择的语言首选项的语言代码。.

Enumeration

Required

子元素

此元素没有子元素。

父元素

Element Description

<JavaScriptFunction> (RibbonDiffXml)

指定从特定 JavaScript 库调用函数的操作。

<CustomRule> (RibbonDiffXml)

指定用于包含对 JavaScript 库中的函数的引用的 EnableRule 定义的规则。

<Url> (RibbonDiffXml)

一个操作,用于打开位于指定地址的网页。

备注

When the CrmParameter is a child of the <Url> (RibbonDiffXml) a Name attribute is required. When the CrmParameter is a child of the <JavaScriptFunction> (RibbonDiffXml) element, the Name attribute is not valid.

备注

  • Value attributes referring to a "Primary..." item refer to the record being viewed in the form.

  • Value attributes referring to the "Selected..." item refer to rows selected within a grid.

When a grid is presented within a form or as an associated view the "Primary.." values refer to the record context in which the grid is displayed. This is true as long as the grid is associated with an entity relationship.

When a grid is displayed independently from any entity relationship, such as in the Homepage grid or if a subgrid is added to a form without being associated with an entity relationship, the "Primary..." values will be null.

备注

Some CrmParameter values pass an EntityReference object. This object contains the following properties:

  • Id: A string of the GUID Id value for the record.

  • Name: A string of the value of the Primary field for the record.

  • TypeCode: A number representing the unique type of entity for the record.

  • TypeName: A string representing the unique name of the entity for the record.

元素信息

XPath

//RibbonDiffXml/CommandDefinitions/CommandDefinition/Actions/JavaScriptFunction/CrmParameter |
//RibbonDiffXml/CommandDefinitions/CommandDefinition/Actions/Url/CrmParameter |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/CustomRule/CrmParameter |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/OrRule/Or/CustomRule/CrmParameter |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/CustomRule/CrmParameter |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/OrRule/Or/CustomRule/CrmParameter

Schema Name

  • CrmParameterType

  • CrmNamedParameterType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

另请参阅

其他资源

自定义命令和功能区

Microsoft Dynamics CRM 2016 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.