build_soap_xml_from_list: Build XML Request Body

View source: R/utils-xml.R

build_soap_xml_from_listR Documentation

Build XML Request Body

Description

Parse data into XML format

Usage

build_soap_xml_from_list(
  input_data,
  operation = c("create", "retrieve", "update", "upsert", "delete", "undelete",
    "emptyRecycleBin", "getDeleted", "getUpdated", "search", "query", "queryMore",
    "convertLead", "merge", "describeSObjects", "setPassword", "resetPassword",
    "findDuplicates", "findDuplicatesByIds"),
  object_name = NULL,
  fields = NULL,
  external_id_fieldname = NULL,
  root_name = NULL,
  ns = character(0),
  root = NULL
)

Arguments

input_data

a data.frame of data to fill the XML body

operation

character; a string defining the type of operation being performed (e.g. "insert", "update", "upsert", "delete", "hardDelete", "query", "queryall").

object_name

character; the name of the Salesforce object that the function is operating against (e.g. "Account", "Contact", "CustomObject__c").

fields

character; one or more strings indicating the fields to be returned on the records

external_id_fieldname

character; string identifying a custom field on the object that has been set as an "External ID" field. This field is used to reference objects during upserts to determine if the record already exists in Salesforce or not.

root_name

character; the name of the root node if created

ns

named vector; a collection of character strings indicating the namespace definitions of the root node if created

root

xmlNode; an XML node to be used as the root

Value

xmlNode; an XML node with the complete XML built using the root and the input data in the format needed for the operation.

Note

This function is meant to be used internally. Only use when debugging.


salesforcer documentation built on March 18, 2022, 6:26 p.m.