Share via


ActionCollection.Create method

Creates an action in the collection.

Namespace:  Microsoft.SharePoint.BusinessData.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function Create ( _
    name As String, _
    isCached As Boolean, _
    position As Byte, _
    isOpenedInNewWindow As Boolean, _
    url As String, _
    imageUrl As String _
) As Action
'Usage
Dim instance As ActionCollection
Dim name As String
Dim isCached As Boolean
Dim position As Byte
Dim isOpenedInNewWindow As Boolean
Dim url As String
Dim imageUrl As String
Dim returnValue As Action

returnValue = instance.Create(name, isCached, _
    position, isOpenedInNewWindow, url, _
    imageUrl)
public Action Create(
    string name,
    bool isCached,
    byte position,
    bool isOpenedInNewWindow,
    string url,
    string imageUrl
)

Parameters

  • isCached
    Type: System.Boolean

    true if the action is cached; otherwise, false.

  • position
    Type: System.Byte

    The position of the action in bytes.

  • isOpenedInNewWindow
    Type: System.Boolean

    true if the URL of the action should be opened in a new window; otherwise, false.

  • url
    Type: System.String

    The URL of the action that is launched when the action is selected.

  • imageUrl
    Type: System.String

    The URL of the icon image for the action.

Return value

Type: Microsoft.SharePoint.BusinessData.Administration.Action

The created action.

Exceptions

Exception Condition
ArgumentException

If name is a null reference (Nothing in Visual Basic) or contains more than 255 characters, or if url is a null reference (Nothing in Visual Basic) or contains more than 2080 characters, or position is zero.

See also

Reference

ActionCollection class

ActionCollection members

Microsoft.SharePoint.BusinessData.Administration namespace