rforcecom.bulkAction: Run Bulk Action

Description Usage Arguments Value References Examples

Description

This function is a convenience wrapper for submitting bulk API jobs

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rforcecom.bulkAction(session,
                           operation=c('insert', 'delete',
                                       'upsert', 'update',
                                       'hardDelete'),
                           data,
                           object,
                           multiBatch=TRUE,
                           batchSize=10000,
                           interval_seconds=5,
                           max_attempts=100,
                           verbose=FALSE)

Arguments

session

a named character vector defining parameters of the api connection as returned by rforcecom.login

operation

a character string defining the type of operation being performed

data

a matrix or data.frame that can be coerced into .csv file for submitting as batch request

object

a character string defining the target salesforce object that the operation will be performed on

multiBatch

a boolean value defining whether or not submit data in batches to the api

batchSize

an integer value defining the number of records to submit if multiBatch is true. The max value is 10000 in accordance with salesforce limits.

interval_seconds

an integer defining the seconds between attempts to check for job completion

max_attempts

an integer defining then max number attempts to check for job completion before stopping

verbose

a boolean on whether to print the API attempt numbers

Value

A data.frame of the results of the bulk job

References

https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/

Examples

1
2
3
4
5
## Not run: 
# update Account object
updates <- rforcecom.bulkAction(session, operation='update', data=my_data, object='Account')

## End(Not run)

hiratake55/RForcecom documentation built on May 17, 2019, 3:58 p.m.