<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.
屬性
Name
代表使用 Url 元素時為此值傳遞的查詢字串參數名稱。
Represents the name of a query string parameter passed using the <Url> (RibbonDiffXml) element.
String
See Remarks
Value
指定要做為參數傳遞的值。
Valid values:
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 識別碼值。
FirstPrimaryItemId
提供一個 GUID 識別碼做為所檢視之記錄的字串。
PrimaryControl
物件,參照功能區命令動作發生時有焦點的控制項。
PrimaryControlId
字串,為具有焦點的控制項提供識別碼值。
SelectedEntityTypeCode
數字,代表方格中所選記錄的唯一實體類型。實體類型程式碼在不同部署之間將會有所不同。
SelectedEntityTypeName
字串,代表方格中所選記錄的唯一實體名稱。
FirstSelectedItemId
提供一個 GUID 識別碼,做為方格中第一個選定項目的字串。
SelectedControl
物件,參照功能區命令動作發生時有焦點的控制項。
SelectedControlSelectedItemCount
方格中選定項目的數目。
SelectedControlSelectedItemIds
方格中所有選定項目之 GUID 識別碼值的字串陣列。
SelectedControlSelectedItemReferences
EntityReference 物件陣列,代表方格中所有選取的項目。
This option is only available when used with the <JavaScriptFunction> (RibbonDiffXml) element.
SelectedControlAllItemCount
數字,表示方格中顯示的項目總數。
SelectedControlAllItemIds
字串陣列,為方格中顯示的所有項目提供 GUID 識別碼值。
SelectedControlAllItemReferences
EntityReference 物件陣列,代表方格中的所有項目。
This option is only available when used with the <JavaScriptFunction> (RibbonDiffXml) element.
SelectedControlUnselectedItemCount
方格中未選取項目的數目。
SelectedControlUnselectedItemIds
方格中所有未選定項目之 GUID 識別碼值的字串陣列。
SelectedControlUnselectedItemReferences
EntityReference 物件陣列,代表方格中未選取的所有項目。
This option is only available when used with the <JavaScriptFunction> (RibbonDiffXml) element.
OrgName
組織的名稱。
OrgLcid
語言碼,代表組織的基礎語言。
UserLcid
語言碼,代表使用者選擇的語言喜好設定。.
Enumeration
Required
子元素
此元素沒有子元素。
上層元素
備註
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.