ctm.query

The method of JS Bridge functionality is intended to make requests to data tables and receive records by criteria.

Query Format

ctm.query(string,handler)

The string is the required SOQL query.

Handler

Use a handler function to describe the output format of the query results, e.g., to display the results of operations or method errors for debugging purposes.

ctm.query('SELECT Id, Name FROM Account WHERE Name = "Google, Inc"')
ctm.query(query, function(response){
    console.log('Query result', response);
})

The result:

{
    "result": [
        {
            "Id": "2233445566",
            "Name": "Sample Account"
        },
    ],
    "success": true,
    "rows": 1
}
``