InvokeCreate

Invokes the Create method on an API object. Returns the API status code.

InvokeCreate(1, 2, 3, 4)

OrdinalTypeDescription
1objectRequiredThe API object to be created
2stringRequiredOutput parameter for the API status message
3numericRequiredOutput parameter for the API error code
4objectCreateOptions API object

Given the example below:

The AMPscript creates the TriggeredSend and TriggeredSendDefinition objects as @ts and @tsDef. It also assigns the correct properties to the objects and passes the object into the InvokeCreate call. The InvokeCreate call returns a status code and status message by which exception handling can be built. In this example, the AMPscript returns an error to the screen.