<JavaScriptFunction> (RibbonDiffXml)

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

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

语法

<JavaScriptFunction 
 FunctionName="String"
 Library="String" >
 <BoolParameter/>
 <CrmParameter />
 <DecimalParameter/>
 <IntParameter/>
 <StringParameter/>
</JavaScriptFunction>

属性和元素

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

属性

Attribute Description Type Usage

FunctionName

The name of the JScript function to call. This string must begin with a letter, the underscore (“_”) character, or the dollar (“$”) symbol. The remaining characters can be any combination of letters, numbers, the underscore character, the dollar symbol or periods.

String

Required

Library

The name of the JScript library Web resource that contains the function. Use the $webresource: directive when specifying the library.

String

Required

子元素

Element Description

<BoolParameter> (RibbonDiffXml)

指定 Boolean 数据类型的值,该值可作为参数传递。

<CrmParameter> (RibbonDiffXml)

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

<DecimalParameter> (RibbonDiffXml)

指定 Decimal 数据类型的值,该值可作为参数传递。

<IntParameter> (RibbonDiffXml)

指定 Integer 数据类型的值,该值可作为参数传递。

<StringParameter> (RibbonDiffXml)

指定 String 数据类型的值,该值可作为参数传递。

父元素

Element Description

<Actions> (RibbonDiffXml)

指定命令将执行的操作。

备注

If you are using this element to call a function that will use window.open to open a web resource, consider using the <Url> (RibbonDiffXml) action instead. With the <Url> action you can specify the Web resource using the $webresource Directive to specify the web resource to open. This will allow the application to specify the URL to the cached web resource and will result in better performance, particularly if the web resource is an HTML web resource that hosts a Silverlight web resource.

备注

Opening entity forms in a dialog window using showModalDialog or showModelessDialog is not supported.

元素信息

XPath

//RibbonDiffXml/CommandDefinitions/CommandDefinition/Actions/JavaScriptFunction

Schema Name

JavaScriptFunctionType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

另请参阅

概念

与 Microsoft Dynamics CRM 结合使用的 JavaScript

其他资源

Ribbon XML reference
自定义命令和功能区

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