InvokeCreate
Invokes the Create method on an API object. Returns the API status code.
InvokeCreate(1, 2, 3, 4)
Ordinal | Type | Description | |
---|---|---|---|
1 | object | Required | The API object to be created |
2 | string | Required | Output parameter for the API status message |
3 | numeric | Required | Output parameter for the API error code |
4 | object | CreateOptions 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.