Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sf_describe_object_fields() fails for some objects #27

Closed
AleksanderPolitanski opened this issue Jul 22, 2019 · 2 comments
Closed

sf_describe_object_fields() fails for some objects #27

AleksanderPolitanski opened this issue Jul 22, 2019 · 2 comments
Assignees
Labels
bug Unintended behavior that should be corrected could not reproduce Could not be reproduced

Comments

@AleksanderPolitanski
Copy link

AleksanderPolitanski commented Jul 22, 2019

Hello,
I'm getting an error when running sf_describe_object_fields("Object__c") for some objects.
The error message is:
"Error: All columns in a tibble must be 1d or 2d objects:
Column validFor is NULL"

For example this error occurs for "Account" and "Opportunity" objects
but not for "Event" or "Task" objects in my org.
Would you be able to give me any hints?
Maybe this error is already knowned?

Many thanks in advance

@StevenMMortimer StevenMMortimer self-assigned this Jul 22, 2019
@StevenMMortimer StevenMMortimer added bug Unintended behavior that should be corrected could not reproduce Could not be reproduced labels Jul 22, 2019
@StevenMMortimer
Copy link
Owner

@AleksanderPolitanski There is a similar issue and discussion that was documented in #16. The short answer is that sometimes organizations have custom objects or fields that are deeply nested or something that is not understood by the parsing function. I cannot help you unless you send me the output of a function that describes the object because I do not know how your org is structured. If you run the following commands and email me the output (reportmort@gmail.com) then I'd be happy to take a look. Note that these functions will only give me the structure of the object in your org and not the records from it, so it should not contain any identifiable record information that you might not want to share with me, but it will tell me the field names and picklist values of the object. If that information is too sensitive to share with me, then you will have to debug on your own.

Function to create data for me to debug (send the RDS file to reportmort@gmail.com)

library(salesforcer)
sf_auth()

obj_dat <- sf_describe_objects(object_names = 'Object__c', api_type = "SOAP")[[1]]
acct_dat <- sf_describe_objects(object_names = 'Account', api_type = "SOAP")[[1]]
oppty_dat <- sf_describe_objects(object_names = 'Opportunity', api_type = "SOAP")[[1]]

saveRDS(obj_dat, "obj_dat.rds")
saveRDS(acct_dat, "acct_dat.rds")
saveRDS(oppty_dat, "oppty_dat.rds")

@StevenMMortimer
Copy link
Owner

In some Salesforce objects the picklists have a "validFor" field that is NULL for some picklist options. I did not expect NULLs to be there. This was fixed in 60b9d5d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended behavior that should be corrected could not reproduce Could not be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants