rbv_api.selectCustomerNumber()
Purpose
Same as selectNumber(), but is called from
the master server and runs on the customer tenant with the specified ID.
Syntax
rbv_api.selectCustomerNumber (custId, query, arg1, arg2…)
Parameters
custId
ID of the customer record to query
query
SQL SELECT query. See an example below and see Query API for examples and limitations.
args
Variable number of parameters passed to query (optional)
Return value
Query result as a number
Permissions required
The current user must be logged into the master server. Unless this API is being used in delayed triggers or scheduled batch jobs, the current user must have either administrative permissions or View permission on the Customer object and the selected object type.
See Managing customer tenants for more information about customer tenants and the master server.
Example
This example fetches number of records from a User object for a customer with the ID
represented by the {!id} token:
var count = rbv_api.selectCustomerNumber({!id}, "SELECT COUNT(1) FROM USER");