Skip to content

CreateCase

Creates a new Case with the specified input.

1
$Domain.CreateCase(channelId: string, inputData: CaseCreateOptions):Case

Parameters

string channelId
    The ID of the channel to create the case in.

CaseCreateOptions inputData
    The case properties.

Returns

The created Case instance.

Remarks

The channel identifier must be a valid channel GUID in the current domain. The operation creates and persists a new case immediately with the current domain ID and current time; it does not infer a channel from the input object.

Example

1
2
3
4
5
6
7
var channelId = $Xml.Evaluate('ChannelId');
var newCase = $Domain.CreateCase(channelId, {
   Subject : 'hello',
   Description : 'hi team members'
   Priority : 1
});
newCase.AddTag('newcase');

See Also