Syntax

Platform.Function.InvokeExecute(apiObject, method[, statusMessage, errorCode])
2–4 arguments

Parameters

Name Type Required Description
apiObject object Yes SOAP object built with CreateObject and configured with SetObjectProperty
method string Yes Execute method name to invoke
statusMessage string No Variable (passed by reference) that receives the status message
errorCode string No Variable (passed by reference) that receives the error code

Examples

var execObj = Platform.Function.CreateObject("ExecuteRequest");
Platform.Function.SetObjectProperty(execObj, "Name", "LogUnsubEvent");

var status = "";
var code = "";
var result = Platform.Function.InvokeExecute(execObj, "LogUnsubEvent", status, code);
if (code !== "0") {
    Write("Error " + code + ": " + status);
}

WSProxy is recommended over InvokeExecute for most use cases — it is simpler, uses native JS objects, and handles serialization automatically.

See Also