Del via


<JavaScriptFunction> (RibbonDiffXml)

Gælder for: CRM 2015 on-prem, CRM Online

Angiver en handling, der kalder en funktion fra et bestemt JavaScript-bibliotek.

Syntaks

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

Attributter og elementer

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

Attributter

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

Underordnede elementer

Element Description

<BoolParameter> (RibbonDiffXml)

Angiver en værdi med en boolesk datatype, der kan overføres som en parameter.

<CrmParameter> (RibbonDiffXml)

Repræsenterer data, der hentes fra Microsoft Dynamics CRM-programmet, som kan overføres som en parameter.

<DecimalParameter> (RibbonDiffXml)

Angiver en værdi med en decimal datatype, der kan overføres som en parameter.

<IntParameter> (RibbonDiffXml)

Angiver en værdi med en heltalsdatatype, der kan overføres som en parameter.

<StringParameter> (RibbonDiffXml)

Angiver en værdi med en strengdatatype, der kan overføres som en parameter.

Overordnede elementer

Element Description

<Actions> (RibbonDiffXml)

Angiver de handlinger, som en kommando udfører.

Bemærkninger

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.

Bemærk

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

Elementoplysninger

XPath

//RibbonDiffXml/CommandDefinitions/CommandDefinition/Actions/JavaScriptFunction

Schema Name

JavaScriptFunctionType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

Se også

Begreber

Bruge JavaScript sammen med Microsoft Dynamics CRM

Andre ressourcer

Ribbon XML reference
Tilpasse kommandoer og båndet

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