Export (0) Print
Expand All

MenuItem Element (ISV.Config)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Represents an item in a menu.

Element Information

Number of occurrencesZero or more
Parent elementsMenu or SubMenu
Child elementsTitles
XPath//IsvConfig/configuration//Menu/MenuItem | //IsvConfig/configuration//SubMenu/MenuItem

Attributes

NameDescriptionTypeRequired
AccessKeySpecifies a single character that works as a keyboard shortcut for accessing the menu item. When this is specified, ALT+<key> can be used to access this menu item.StringNo
AvailableOfflineSet this to true if the control does not depend on the user being connected to the organization's network.

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.

Valid values:

Web
Outlook

stringNo
JavaScriptSpecifies the JavaScript code that is executed when the menu item is clicked.StringNo
PassParamsSpecifies whether information about the record and language context are passed to the URL. See Passing Parameters.

Valid values:

0 = don't pass parameters [default]
1 = pass parameters

unsignedByteNo
UrlSpecifies the URL to be opened when the menu item is selected.stringNo
ValidForCreateSpecifies whether the menu item should be shown in the detail form window when an entity instance is being created.BooleanNo
ValidForUpdateSpecifies whether the menu item should be shown in the detail form window when an entity instance is being updated.BooleanNo
WinModeSpecifies the window mode.

Valid values:

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

unsignedByteNo
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 MenuItem, you have access to the parent window by using the dialog arguments.

Examples

The following code examples show the use of the MenuItem element.

<MenuItem Url="http://www.microsoft.com" >
  <Titles>
    <Title LCID="1033" Text="New Window" />
  </Titles>
</MenuItem>
<MenuItem Url="http://www.microsoft.com" WinMode="2">
  <Titles>
    <Title LCID="1033" Text=" Modeless Dialog" />
  </Titles>
</MenuItem>
<MenuItem Url="http://www.microsoft.com" WinMode="1">
  <Titles>
    <Title LCID="1033" Text=" Modal Dialog" />
  </Titles>
</MenuItem>
<MenuItem JavaScript="alert('test');">
  <Titles>
    <Title LCID="1033" Text="Custom JavaScript " />
  </Titles>
</MenuItem>
<MenuItem Url="http://www.microsoft.com" PassParams="1" >
  <Titles>
    <Title LCID="1033" Text="Test 2" />
  </Titles>
</MenuItem>

See Also

Concepts

Tasks

Other Resources


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft