salesforcer icon indicating copy to clipboard operation
salesforcer copied to clipboard

Report filters. Error: BAD_REQUEST: Some fields, including description and long text area fields, can't be included in filter logic.

Open JacobNord opened this issue 4 years ago • 2 comments

Issue description

A brief description of the problem.

When filtering on the fly, I simply wish to change the date filter on the report as it comes into R. Currently the report shows me YESTERDAY in salesforce, along with other filters. When I pull it in I want to be able to change date that as needed.

When I try and change this one filter, it seems to not preserve any of the others.

vfilter1 <- list(column ="CREATED_DATE",
                operator = "equals",
                value = "LAST 7 Days")

This filter works, but when alone, the other filters already on the report seem to not be preserved. So i tried to add all the filters so i could change one as needed.

When i attempt to add one of the filters, it gives me that above error.

 report_details$reportMetadata$reportFilters #tells me the fields
[[1]]
[[1]]$column
[1] "field_key"

[[1]]$filterType
[1] "fieldValue"

[[1]]$isRunPageEditable
[1] TRUE

[[1]]$operator
[1] "equals"

[[1]]$value
[1] "Dealer Name"

#filter based on the report details

vfilter3 <- list(column = "field_key",
                 operator = "equals",
                 value = "Dealer Name")

this filter is exactly what sales force shows, and what the report filter shows with the above command, but produces an error

JacobNord avatar Sep 15 '21 23:09 JacobNord

@JacobNord Thanks for raising. I'm not sure if you tried this, but have you passed a list of lists? Like this:

filters <- list(
  list(column = "field_key", operator = "equals", value = "Dealer Name"),
  list(column = "CREATED_DATE", operator = "equals", value = "LAST 7 Days")
)

StevenMMortimer avatar Sep 17 '21 17:09 StevenMMortimer

@StevenMMortimer I get the same error. "Error: BAD_REQUEST: Some fields, including description and long text area fields, can't be included in filter logic. See the help for more information."

JacobNord avatar Sep 17 '21 21:09 JacobNord