Share via


Helper.ToSPItemKeyExceptNull method

Coerces an object into an SPItemKey object.

Namespace:  Microsoft.SharePoint.WorkflowActions
Assembly:  Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)

Syntax

'Declaration
Public Shared Function ToSPItemKeyExceptNull ( _
    context As WorkflowContext, _
    val As Object _
) As SPItemKey
'Usage
Dim context As WorkflowContext
Dim val As Object
Dim returnValue As SPItemKey

returnValue = Helper.ToSPItemKeyExceptNull(context, _
    val)
public static SPItemKey ToSPItemKeyExceptNull(
    WorkflowContext context,
    Object val
)

Parameters

Return value

Type: Microsoft.SharePoint.Workflow.SPItemKey
The list item.

Remarks

If the value supplied as the val parameter is a SPItemKey, the SPItemKey is returned. If the value is an Integer or String, the ToSPItemKeyExceptNull method attempts to coerce it into an SPItemKey. Otherwise, a CoercionException is thrown.

See also

Reference

Helper class

Helper members

Microsoft.SharePoint.WorkflowActions namespace