Learn R Programming

RForcecom (version 1.1)

rforcecom.retrieve: Retrieve a record

Description

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 the 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 ordered in descending 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.

See Also

rforcecom.login

Examples

Run this code
## Not run: 
#  # Retrieving a record
#  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)
#  rforcecom.retrieve(session, objectName, fields, order = c("Industry","Name"))
#  rforcecom.retrieve(session, objectName, fields, order = c("Industry","Name"),
#                     inverse=TRUE, nullsLast=TRUE)
#  ## End(Not run)

Run the code above in your browser using DataLab