This documentation is archived and is not being maintained.

Button Element (ISV.Config)

Forefront
banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Represents a button on a toolbar.

Element Information

Number of occurrencesZero or more
Parent elementsToolBar
Child elementsTitles

Tooltips

XPath//IsvConfig/configuration/Root/ToolBar/Button | //IsvConfig/configuration/Entities/Entity/ToolBar/Button

Attributes

NameDescriptionTypeRequired
AccessKeySpecifies a single character that works as a keyboard shortcut for accessing the button. When this is specified, ALT+<key> can be used to access this button.StringNo
AvailableOfflineSpecifies whether the control is available offline.

Valid values:

true = control is displayed when offline [default]
false = control is not displayed when offline

BooleanNo
ClientSpecifies the intended client for the control. The default is blank, which shows in both clients.

Valid values:

Web
Outlook

StringNo
IconSpecifies the file name of the icon for the button. Must be a valid URL to a file that contains an icon. The icon should be 16x16 pixels.StringNo
JavaScriptSpecifies a script to be executed when the button is clicked. See Remarks.StringNo
PassParamsSpecifies whether information about the record and language context are passed to the URL. See Passing Parameters.

Valid values:

0 = do not pass parameters [default]
1 = pass parameters

BooleanNo
UrlSpecifies the URL to be opened when the button is clicked. See Remarks.StringNo
ValidForCreateIndicates whether the toolbar should be shown in the detail form window when an entity instance is being created.BooleanNo
ValidForUpdateIndicates whether the toolbar should be shown in the detail form window when an entity instance is being updated.BooleanNo
WinModeSpecifies the window mode. See Remarks.

Valid values:

0 = Window [default]
1 = Modal Dialog
2 = Modeless Dialog

Unsigned byteNo
WinParamsSpecifies the parameters to be passed to the window. The format of this parameter is different depending on the value of the WinMode parameter. StringNo

Remarks

You should specify either the URL or the JavaScript attribute. If both are specified, the URL is ignored.

When you open a new window from a button, and the page is on the same domain as the Microsoft Dynamics CRM server, you have access to the parent window by using the window.dialogArguments property.

For WinMode = 0, the window.open method is used. For more information, see the "open Method" topic in the MSDN Library at http://msdn2.microsoft.com/en-us/library/ms536651.aspx.

For WinMode = 1 (modal dialog), window.showModalDialog method is used. For more information, see the "showModalDialog Method" topic in the MSDN Library at http://msdn2.microsoft.com/en-us/library/ms536759.aspx.

For WinMode = 2 (modal dialog), the window.showModelessDialog method is used. For more information, see the "showModelessDialog Method" topic in the MSDN Library at http://msdn2.microsoft.com/en-us/library/ms536761.aspx.

If you configure a button to display both an Icon and a Title, if there is not enough room to display both the Icon and the text, the text will be hidden and only the Icon will remain visible. If it is critical that both the Title and the Icon be displayed, use a MenuItem element.

Example

The following code sample shows the use of the Button element.

<Button Icon="/_imgs/ico_18_debug.gif" Url="http://www.microsoft.com" PassParams="1" WinParams="" WinMode="0">
   <Titles>
      <Title LCID="1033" Text="English Button Text" />
   </Titles>
   <ToolTips>
      <ToolTip LCID="1033" Text="English ToolTip Text" />
   </ToolTips>
</Button>

See Also

Concepts

Tasks

Other Resources


© 2010 Microsoft Corporation. All rights reserved.


Show: