Retrieve a record

Usage

rforcecom.retrieve(session, objectName, fields, limit=NULL, id=NULL,
  offset=NULL, order=NULL, inverse=NULL, nullsLast=NULL)

Arguments

session
Session data. It can be retrieved from rforcecom.login().
objectName
An object name. (ex: “Account”, “Contact”, “CustomObject__c”)
fields
A List of field names. (ex: c(“Id”, “Name”, “Industry”, “AnnualRevenue)”)
limit
Number of records to retrieve. (ex: 5)
id
Record ID to retrieve. (ex: “999x000000xxxxxZZZ”)
offset
Specifies the starting row offset. (ex: “100″)
order
A list for controling the order of query results. (ex: “c(“Industry”,”Name”)”)
inverse
If it is TRUE, the results are orderd in decending order. This parameter works when order parameter has been set. (Default: FALSE)
nullsLast
If it is TRUE, null records list in last. If not null records list in first. This parameter works when order parameter has been set. (Default: FALSE)

Value

Result dataset.

Example

objectName <- "Account"
fields <- c("name", "Industry", "AnnualRevenue")
rforcecom.retrieve(session, objectName, fields)
rforcecom.retrieve(session, objectName, fields, limit = 5)
rforcecom.retrieve(session, objectName, fields, id = "999x000000xxxxxZZZ")
rforcecom.retrieve(session, objectName, fields, order = c("Industry","Name"))
rforcecom.retrieve(session, objectName, fields, order = c("Industry","Name"),
inverse=TRUE, nullsLast=TRUE)