Share via


CodeMethodAction Element in Actions (SolutionManifestDeclarativeExtensions Schema)

Applies to: SharePoint Server 2010

The <CodeMethodAction> element is used to execute a custom code action or to execute one of the predefined actions provided by Microsoft Business Connectivity Services (BCS).

Namespace: https://schemas.microsoft.com/office/2009/05/BusinessApplications/Manifest/DeclarativeExtensions

Schema: SolutionManifestDeclarativeExtensions

<CodeMethodAction  MethodType = "String" QualifiedTypeName = "String" MethodName = "String" Caption = "String" Tooltip = "String" Image = "String" DisplayLocations = "String" DisplayOrder = "Int" Scope = "String" Name = "String" Description = "String"> </CodeMethodAction>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

MethodType

The type of the action to execute.

Required.

The following table lists the possible values for this attribute.

Value

Description

Custom

Executes a custom code action.

ExecuteActionsSequence

Sequentially executes a specified set of actions. The names of the actions to be executed should be specified as parameters to the action. The order of execution is determined by the order of the action names in the parameters.

CopyEntity

Copies the values of the fields of the current item to the Clipboard. Each field value is separated by a tab character.

CreateEntity

Opens the user interface for the Create Entity layout in Microsoft Outlook.

EditEntity

Opens the user interface for the Edit Entity layout in Outlook.

DeleteEntity

Deletes the current item.

ViewDetails

Opens the user interface for the Edit Entity layout in read-only mode in Outlook.

ShowTaskpaneLayout

Shows the specified layout in the Outlook task pane. The name of the layout to be displayed should be specified as a parameter.

ShowRegionLayout

Shows the specified layout in the specified Outlook form region. The name of the layout to be displayed and the Outlook form region ID should be specified as a parameter. The form region ID should match the ID defined in the FormRegions section of the Solution Manifest.

ShowHostAgnosticWindowLayout

Shows the specified layout in a WinForm control. The name of the layout to be displayed should be specified as a parameter.

ShowHostSpecificWindowLayout

Shows the specified layout in an Outlook form. The name of the layout to be displayed should be specified as a parameter.

QualifiedTypeName

The assembly-qualified name of the class that defines the code action, which includes the name of the assembly from which the class was loaded. For more information about how to specify this value, see Type.AssemblyQualifiedName Property.

Example: QualifiedTypeName="CustomCodeActionNameSpace.CustomCodeActionCalssName, CustomCodeActionAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3c6b236b1e85d97a"

Optional.

Attribute type: String

MethodName

The name of the method to execute in the class.

Optional.

Attribute type: String

Caption

The caption for the action. This is displayed as a caption for the action in the Outlook user interface.

Optional.

Attribute type: String

Tooltip

The tooltip for the action. This is displayed as a tooltip for the action in the Outlook user interface.

Optional.

Attribute type: String

Image

The path to an icon file. The icon is displayed for the action in the Outlook user interface. The path should be relative to the location of the solution manifest.

Optional.

Attribute type: String

DisplayLocations

The locations in the Outlook user interface where this action should be displayed. This attribute can be a combination of the following bit flags: 0 (none, action is not displayed anywhere), 1 (action is displayed on the external data parts menu), 2 (action is displayed on the item context menu), 4 (action is displayed on the ribbon).

Optional.

Attribute type: String

DisplayOrder

Used if the action is surfaced in a List External Data Part. Specifies the suggested position of this action among the other actions of this external content type in the menu.

Optional.

Attribute type: Int

Scope

Used if the action is surfaced in a List External Data Part. Specifies whether this action needs an item to be selected in a List External Data Part.

Optional.

The following table lists the possible values for this attribute.

Value

Description

ItemContext

Needs an item context. For example, an update action needs an item context to update an item.

StaticContext

Does not need an item context. For example, a create action does not need an item context.

Name

A name for this action.

Required.

Attribute type: String

Description

A description for this action.

Optional.

Attribute type: String

Child Elements

Element

Description

Parameters Element in ActionDefinition (SolutionManifestDeclarativeExtensions Schema)

Actions can take parameters. The Parameters element lists the parameters of the action.

Parent Elements

Element

Description

Actions Element in DeclarativeContextDefinition (SolutionManifestDeclarativeExtensions Schema)

The Actions element that contains this action.