rforcecom.createBulkJob: Create Bulk API Job

Description Usage Arguments Value References Examples

Description

This function initializes a Job in the Salesforce Bulk API

Usage

1
2
3
4
5
6
7
8
rforcecom.createBulkJob(session, 
                               operation=c('insert', 'delete', 
                                           'query', 'upsert', 
                                           'update', 'hardDelete'),
                               object='Account',
                               contentType=c('CSV', 'ZIP_CSV', 'ZIP_XML', 'ZIP_JSON'),
                               externalIdFieldName=NULL,
                               concurrencyMode='Parallel')

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

object

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

contentType

a character string being one of 'CSV','ZIP_CSV','ZIP_XML', or 'ZIP_JSON'

externalIdFieldName

a character string identifying a custom field that has the "External ID" attribute on the target object. This field is only used when performing upserts. It will be ignored for all other operations.

concurrencyMode

a character string either "Parallel" or "Serial" that specifies whether batches should be completed sequentially or in parallel. Use "Serial" only if Lock contentions persist with in "Parallel" mode.

Value

A list parameters defining the created job, including id

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# insert into Account
job_info <- rforcecom.createBulkJob(session, operation='update', object='Account')

# delete from Account
job_info <- rforcecom.createBulkJob(session, operation='delete', object='Account')

# update into Account
job_info <- rforcecom.createBulkJob(session, operation='update', object='Account')

# upsert into Account
job_info <- rforcecom.createBulkJob(session, operation='upsert',
                                    externalIdFieldName='My_External_Id__c',
                                    object='Account')

# insert attachments
job_info <- rforcecom.createBulkJob(session, operation='insert', object='Attachment')

## End(Not run)

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