Microsoft Dynamics CRM 2011 – Define Ribbon Actions


Define the actions to be performed by a ribbon control in a <CommandDefinition> (RibbonDiffXml) element together with rules that control whether the control is enabled or visible in the ribbon.

A Ribbon control can perform two types actions and may include multiple actions:

  • JavaScript Functions: A <JavaScriptFunction> (RibbonDiffXml) element references a function defined in a Script Web resource.
  • Open a URL: The ribbon opens a URL using the value from an Address attribute in the <Url> (RibbonDiffXml) element. Additional parameters can pass information about what querystring parameters are passed and the mode in which the window opens.

You have several options to pass parameters to a URL using the ribbon.

Passing parameters to Ribbon actions

Use the following elements to define data to pass to your custom action:

<BoolParameter> (RibbonDiffXml)

Specifies a value with a Boolean data type that may be passed as a parameter.

<CrmParameter> (RibbonDiffXml)

Represents data retrieved from the Microsoft Dynamics CRM application that may be passed as a parameter.

<DecimalParameter> (RibbonDiffXml)

Specifies a value with a decimal data type that may be passed as a parameter.

<IntParameter> (RibbonDiffXml)

Specifies a value with an integer data type that may be passed as a parameter.

<StringParameter> (RibbonDiffXml)

Specifies a value with a string data type that may be passed as a parameter.

When parameters are passed to a <Url> (RibbonDiffXml) element they are passed as a query string. Therefore, they must include a name value to represent the ”key” in the query string key/value pair.

Parameters passed to a <JavaScriptFunction> (RibbonDiffXml) do not require a name but they must be included in the order expected by the function and be of the correct data type.

My above blog is based on Microsoft’s Official information.

I hope this blog about ‘Microsoft Dynamics CRM 2011 – Define Ribbon Actions’ was informative. Please feel free to leave your comments.

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: