StevenMMortimer / salesforcer

This R package connects the Salesforce APIs from R using tidy principles.
https://stevenmmortimer.github.io/salesforcer/
Other
81 stars 19 forks source link

Error returned with OwnerChangeOptions of sf_control() #94

Closed vancelopez closed 3 years ago

vancelopez commented 3 years ago

Issue submission checklist

When filing your issue please make an attempt to troubleshoot a little bit on your own. If your issue is specifically related to a query, but please consider using the "Query issue template". Also, please consider some of the suggestions below before submitting an issue. Thank you!


Issue description

Error received when using the OwnerChangeOptions argument of sf_control() in a call to sf_update(). I've tried using control directly or passing with three dots and it generates the same subscript out of bounds error. I've also included all options of OwnerChangeOptions and had it generate the same error. I don't fully understand the output from verbose, but I'm wondering if the code generated for the option field of OwnerChangeOptions is working as intended.

reprex

results_test <- sf_update(
  input_data = updateFileTest, 
  object_name = "Account",
  verbose = TRUE,
  OwnerChangeOptions = list(options = list(list(execute = TRUE, type = "TransferOwnedOpenOpportunities")))
)

#masking IDs
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:partner.soap.sforce.com" xmlns:urn1="urn:sobject.partner.soap.sforce.com">
  <soapenv:Header>
    <urn:SessionHeader>
      <urn:sessionId>000000000000000!ARQAQBhYHiMMHdNSHxqDmmLDXa1xglCdzSkrev6ceHUhwZfHitQCB3nVtndmG_zWkeGIb5OTev8mFhoKccLJds_YPN78qVlL</urn:sessionId>
    </urn:SessionHeader>
    <urn:OwnerChangeOptions>
      <urn:options>list(execute = TRUE, type = "TransferOwnedOpenOpportunities")</urn:options>
    </urn:OwnerChangeOptions>
  </soapenv:Header>
  <soapenv:Body>
    <urn:update>
      <urn:sObjects>
        <urn1:type>Account</urn1:type>
        <Id>000000000000AAH</Id>
        <OwnerId>000000000000AAE</OwnerId>
      </urn:sObjects>
    </urn:update>
  </soapenv:Body>
</soapenv:Envelope>
Error in error_message$faultstring[[1]] : subscript out of bounds

Session Info


- Session info -----------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.6.2 (2019-12-12)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/Los_Angeles         
 date     2020-12-08                  

- Packages ---------------------------------------------------------------------------------------------------------------
 package     * version  date       lib source        
 assertthat    0.2.1    2019-03-21 [1] CRAN (R 3.6.2)
 backports     1.2.0    2020-11-02 [1] CRAN (R 3.6.3)
 base64enc     0.1-3    2015-07-28 [1] CRAN (R 3.6.0)
 broom         0.7.2    2020-10-20 [1] CRAN (R 3.6.3)
 callr         3.5.1    2020-10-13 [1] CRAN (R 3.6.3)
 cellranger    1.1.0    2016-07-27 [1] CRAN (R 3.6.2)
 cli           2.2.0    2020-11-20 [1] CRAN (R 3.6.3)
 colorspace    2.0-0    2020-11-11 [1] CRAN (R 3.6.3)
 crayon        1.3.4    2017-09-16 [1] CRAN (R 3.6.2)
 curl          4.3      2019-12-02 [1] CRAN (R 3.6.2)
 data.table    1.13.2   2020-10-19 [1] CRAN (R 3.6.3)
 DBI           1.1.0    2019-12-15 [1] CRAN (R 3.6.2)
 dbplyr        2.0.0    2020-11-03 [1] CRAN (R 3.6.3)
 desc          1.2.0    2018-05-01 [1] CRAN (R 3.6.3)
 devtools      2.3.2    2020-09-18 [1] CRAN (R 3.6.3)
 digest        0.6.27   2020-10-24 [1] CRAN (R 3.6.3)
 dplyr       * 1.0.2    2020-08-18 [1] CRAN (R 3.6.3)
 ellipsis      0.3.1    2020-05-15 [1] CRAN (R 3.6.3)
 fansi         0.4.1    2020-01-08 [1] CRAN (R 3.6.2)
 forcats     * 0.5.0    2020-03-01 [1] CRAN (R 3.6.3)
 fs            1.5.0    2020-07-31 [1] CRAN (R 3.6.3)
 generics      0.1.0    2020-10-31 [1] CRAN (R 3.6.3)
 ggplot2     * 3.3.2    2020-06-19 [1] CRAN (R 3.6.3)
 glue        * 1.4.2    2020-08-27 [1] CRAN (R 3.6.3)
 gtable        0.3.0    2019-03-25 [1] CRAN (R 3.6.2)
 haven         2.3.1    2020-06-01 [1] CRAN (R 3.6.2)
 hms           0.5.3    2020-01-08 [1] CRAN (R 3.6.2)
 httr          1.4.2    2020-07-20 [1] CRAN (R 3.6.3)
 jsonlite      1.7.1    2020-09-07 [1] CRAN (R 3.6.3)
 lifecycle     0.2.0    2020-03-06 [1] CRAN (R 3.6.3)
 lubridate     1.7.9.2  2020-11-13 [1] CRAN (R 3.6.3)
 magrittr      2.0.1    2020-11-17 [1] CRAN (R 3.6.3)
 memoise       1.1.0    2017-04-21 [1] CRAN (R 3.6.3)
 mime          0.9      2020-02-04 [1] CRAN (R 3.6.2)
 modelr        0.1.8    2020-05-19 [1] CRAN (R 3.6.3)
 munsell       0.5.0    2018-06-12 [1] CRAN (R 3.6.2)
 pillar        1.4.7    2020-11-20 [1] CRAN (R 3.6.3)
 pkgbuild      1.1.0    2020-07-13 [1] CRAN (R 3.6.3)
 pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 3.6.2)
 pkgload       1.1.0    2020-05-29 [1] CRAN (R 3.6.2)
 prettyunits   1.1.1    2020-01-24 [1] CRAN (R 3.6.2)
 processx      3.4.5    2020-11-30 [1] CRAN (R 3.6.3)
 ps            1.5.0    2020-12-05 [1] CRAN (R 3.6.2)
 purrr       * 0.3.4    2020-04-17 [1] CRAN (R 3.6.3)
 R6            2.5.0    2020-10-28 [1] CRAN (R 3.6.3)
 Rcpp          1.0.5    2020-07-06 [1] CRAN (R 3.6.3)
 readr       * 1.4.0    2020-10-05 [1] CRAN (R 3.6.3)
 readxl        1.3.1    2019-03-13 [1] CRAN (R 3.6.2)
 remotes       2.2.0    2020-07-21 [1] CRAN (R 3.6.3)
 reprex        0.3.0    2019-05-16 [1] CRAN (R 3.6.2)
 rlang         0.4.9    2020-11-26 [1] CRAN (R 3.6.3)
 rlist         0.4.6.1  2016-04-04 [1] CRAN (R 3.6.3)
 rprojroot     2.0.2    2020-11-15 [1] CRAN (R 3.6.3)
 rstudioapi    0.13     2020-11-12 [1] CRAN (R 3.6.3)
 rvest         0.3.6    2020-07-25 [1] CRAN (R 3.6.3)
 salesforcer * 0.2.2    2020-09-09 [1] CRAN (R 3.6.3)
 scales        1.1.1    2020-05-11 [1] CRAN (R 3.6.3)
 sessioninfo   1.1.1    2018-11-05 [1] CRAN (R 3.6.3)
 stringi       1.5.3    2020-09-09 [1] CRAN (R 3.6.2)
 stringr     * 1.4.0    2019-02-10 [1] CRAN (R 3.6.2)
 testthat      3.0.0    2020-10-31 [1] CRAN (R 3.6.3)
 tibble      * 3.0.4    2020-10-12 [1] CRAN (R 3.6.3)
 tidyr       * 1.1.2    2020-08-27 [1] CRAN (R 3.6.3)
 tidyselect    1.1.0    2020-05-11 [1] CRAN (R 3.6.3)
 tidyverse   * 1.3.0    2019-11-21 [1] CRAN (R 3.6.2)
 usethis       1.6.3    2020-09-17 [1] CRAN (R 3.6.3)
 utf8          1.1.4    2018-05-24 [1] CRAN (R 3.6.2)
 vctrs         0.3.5    2020-11-17 [1] CRAN (R 3.6.3)
 withr         2.3.0    2020-09-22 [1] CRAN (R 3.6.3)
 XML           3.99-0.3 2020-01-20 [1] CRAN (R 3.6.2)
 xml2          1.3.2    2020-04-23 [1] CRAN (R 3.6.3)
 zip           2.1.1    2020-08-27 [1] CRAN (R 3.6.3)

[1] C:/Users/vance.lopez/Documents/R/win-library/3.6
[2] C:/Program Files/R/R-3.6.2/library```