Skip to content

\<object>.getBinaryStatus

The \<object>.getBinaryStatus returns an array of primary keys based on the query for status.

Note:
* For the \<object>.getBinaryStatus API to work, ensure that the object definition in Volt MX Foundry has a defined binary column.

Volt MX Iris (JavaScript)

Note: Not supported for Mobile Web, Windows, and Desktop Web channels.

Signature

<VMXObj>.getBinaryStatus(options,successCallback,failureCallback)

Parameters

Parameter Type Description Required
options JSON Provide options to get customized binary status. For more information, refer Sync Options. Yes
successCallback Function The function is invoked on successful execution. Yes
failureCallback Function The function is invoked on an error with the cause of failure as an argument upon execution failure. Yes

Sync Options

Key Type Description Required
download JSON To get the binary download status of a particular binary column, provide the following variables as inputs: columnName (String): The binary column name of the required object. queryType (Number):A combination of the following values:{voltmx.sdk.OfflineObjects.BinaryStatus.pending, voltmx.sdk.OfflineObjects.BinaryStatus.completed, voltmx.sdk.OfflineObjects.BinaryStatus.errored } > Note: Use bitwise OR (" ") between the queryTypes to use the combination of the values.

Return Type

void

Example

var mediaObject = new voltmx.sdk.VMXObj("Media");
var options = {
    "download": {
        "columnName": "image",
        "queryType": voltmx.sdk.OfflineObjects.BinaryStatus.pending | voltmx.sdk.OfflineObjects.BinaryStatus.completed
    }
};

mediaObject.getBinaryStatus(options, onSuccess, onFailure);

function onSuccess(data) {
    //data={
    //  download:{
    //      completed:[{UserId=1}],
    //      pending:[{UserId=2}]
    //}
    //}
    alert("get binary status success " + JSON.stringify(data));
}

function onFailure(error) {
    alert("get binary status failed " + JSON.stringify(error));
}

Note: Not supported in the current version.

iOS (Objective C)

Note: Not supported in the current version. -->