EventActionsCreate Method (ConnectionId, SessionId, CategoryId, ContentStudioEvents, String, ActionTypes, String, Boolean, Int32, String, Boolean) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Saves an Event Actions item.

Namespace: ContentStudio.EventActions
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public int Create(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	ContentStudioEvents csEvent,
	string actionName,
	ActionTypes actionType,
	string command,
	bool runOnce,
	int timeOut,
	string moniker,
	bool unique
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
categoryId
Type: ContentStudio.DocumentCategoryId
An identifier to the category where the event be connected to.
csEvent
Type: ContentStudio.EventActionsContentStudioEvents
One of the valid events defined in the ContentStudioEvents enumeration to save. Unspecified is not allowed.
Note
Not all events are implemented as synchronous events. See the ContentStudioEvents enumeration for more information.
actionName
Type: SystemString
The display name of the event actions. This parameter cannot be null or empty or exceed MAX_NAME_SIZE characters in length.
actionType
Type: ContentStudio.EventActionsActionTypes
The type of action, defined in the ActionTypes enumeration, to be performed by the Event Action subsystem.
command
Type: SystemString
The command to execute. The syntax for the command is depending on the ActionType. This parameter cannot be null or exceed MAX_COMMAND_SIZE characters in length.
runOnce
Type: SystemBoolean
Indicates that the event will be triggered once only. After that the event has been triggered it will be disabled.
timeOut
Type: SystemInt32
The timeout in seconds
moniker
Type: SystemString
The moniker to use. The moniker is used to indicate to the Service Manager how or where the event should be directed. Depending on the action this can be a URL or a moniker used to create an external object.
unique
Type: SystemBoolean
Determines whether an entry must be unique withing the category and event or not

Return Value

Type: Int32
The identifier of the created Event Actions item
Exceptions

ExceptionCondition
NullReferenceExceptionA string parameter was null
ArgumentOutOfRangeExceptionA string parameter was has too a long value or the name was empty
CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

CREATE permission on the event actions container is required to create a new item.
See Also

Reference