Partilhar via


<JavaScriptFunction> (RibbonDiffXml)

Aplica-se a: CRM 2016 on-prem, CRM Online

Especifica uma ação que chama uma função em uma biblioteca JavaScript específica.

Sintaxe

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

Atributos e elementos

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

Atributos

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

Elementos filho

Element Description

<BoolParameter> (RibbonDiffXml)

Especifica um valor com um tipo de dados booliano que pode ser passado como um parâmetro.

<CrmParameter> (RibbonDiffXml)

Representa os dados recuperados do aplicativo do Microsoft Dynamics CRM que pode ser passado como parâmetro.

<DecimalParameter> (RibbonDiffXml)

Especifica um valor com um tipo de dados decimais que pode ser passado como um parâmetro.

<IntParameter> (RibbonDiffXml)

Especifica um valor com um tipo de dados inteiro que pode ser passado como um parâmetro.

<StringParameter> (RibbonDiffXml)

Especifica um valor com um tipo de dados de cadeia de caracteres que pode ser passado como um parâmetro.

Elemento pai

Element Description

<Actions> (RibbonDiffXml)

Especifica as ações que um comando executará.

Comentários

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.

Observação

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

Informações do elemento

XPath

//RibbonDiffXml/CommandDefinitions/CommandDefinition/Actions/JavaScriptFunction

Schema Name

JavaScriptFunctionType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

Consulte também

Conceitos

Usar o Javascript com o Microsoft Dynamics CRM

Outros recursos

Ribbon XML reference
Personalizar os comandos e a faixa de opções

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