<JavaScriptFunction> (RibbonDiffXml)

S'applique à: CRM 2016 on-prem, CRM Online

Spécifie une action appelant une fonction à partir d'une bibliothèque JavaScript spécifique.

Syntaxe

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

Attributs et éléments

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

Attributs

Attribute Description Type Usage

FunctionName

The name of the JavaScript 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 JavaScript library Web resource that contains the function. Use the $webresource: directive when specifying the library.

String

Required

Éléments enfants

Element Description

<BoolParameter> (RibbonDiffXml)

Spécifie une valeur avec un type de données booléen pouvant être transmise sous la forme d'un paramètre.

<CrmParameter> (RibbonDiffXml)

Représente les données récupérées auprès de l'application Microsoft Dynamics CRM pouvant être transmises en tant que paramètre.

<DecimalParameter> (RibbonDiffXml)

Spécifie une valeur avec un type de données décimal pouvant être transmis sous la forme d'un paramètre.

<IntParameter> (RibbonDiffXml)

Spécifie une valeur avec un type de données entier pouvant être transmise sous la forme d'un paramètre.

<StringParameter> (RibbonDiffXml)

Spécifie une valeur avec un type de données de chaîne pouvant être transmise sous la forme d'un paramètre.

Éléments parents

Element Description

<Actions> (RibbonDiffXml)

Spécifie les actions exécutées par une commande.

Remarques

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.

Notes

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

Informations sur l'élément

XPath

//RibbonDiffXml/CommandDefinitions/CommandDefinition/Actions/JavaScriptFunction

Schema Name

JavaScriptFunctionType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

Voir aussi

Concepts

Utilisation de JavaScript avec Microsoft Dynamics CRM

Autres ressources

Ribbon XML reference
Personnaliser les commandes et le ruban

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