dyn_update: Update Records

Description Usage Arguments Value Examples

View source: R/update.R

Description

Updates one or more records to your organization’s data.

Usage

1
dyn_update(input_data, entity_name, verbose = FALSE)

Arguments

input_data

named vector, matrix, data.frame, or tbl_df; data can be coerced into a data.frame

entity_name

character; the name of one MS Dynamics CRM entity that the function is operating against (e.g. "Account", "Contact", "CustomObject__c")

verbose

logical; do you want informative messages?

Value

tbl_df of records with success indicator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
n <- 2
new_contacts <- tibble(firstname = rep("Test", n),
                       lastname = paste0("Contact", 1:n))
new_contacts_result <- dyn_create(new_contacts, entity_name="contact")

update_contacts <- tibble(firstname = rep("TestTest", n),
                          lastname = paste0("Contact", 1:n),
                          id = new_contacts_result$id)
updated_contacts_result1 <- dyn_update(update_contacts, entity_name="contact")
check_contacts <- dyn_retrieve(new_contacts_result$id, 
                               entity_name="contact", columns=c("fullname"))
#clean up
deleted_contacts_result1 <- dyn_delete(updated_contacts_result1$id,
                                       entity_name="contact")

## End(Not run)

StevenMMortimer/rdynamicscrm documentation built on July 9, 2019, 11:37 a.m.