Non System Admin users not able to use Attachment's search

  • 1
  • Problem
  • Updated 1 year ago
  • Solved
  • (Edited)
We are using Skuid on Salesforce, and have added attachment related list in our UI page.
With attachment there is a search box as well in Skuid. This box works well for System Administrators, but somehow does not work for non admin users.
They get an error like "There was an error performing the search request"
Wasn't able to find anything related to this error. Any leads would be appreciated.
Photo of Arjun Joshi

Arjun Joshi

  • 100 Points 100 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Arjun, this sounds like there may be a security or permissions issue on the attachment object, or on the object that these files are linked to. Here's information about Skuid attachments, to help provide context. https://docs.skuid.com/latest/en/skuid/components/file-upload/attach-file.html

Do you see any browser console errors when this issue comes up?
Photo of susan.nordquist

susan.nordquist

  • 354 Points 250 badge 2x thumb
I am having this issue as well
Photo of Arjun Joshi

Arjun Joshi

  • 100 Points 100 badge 2x thumb
I don't think its a permissions issue, because users can access those attachments. And from console it seems to be throwing "illegal filter on attachment" error.

I was however able to resolve this by checking "Use SOSL to improve search performance" for search under Filters & Search > Search Fields.

It seems something is off, which is causing problematic SOQL function. Not sure what though.
Photo of susan.nordquist

susan.nordquist

  • 354 Points 250 badge 2x thumb
Thank you for this work around!
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Arjun, I'm glad you found a workaround. It may be that your users are running searches on fields that they either don't have access to, or fields that Salesforce won't let you query (the attachment object is a little unusual in this regard). The SOSL search is more picky about which fields it will try to search through, and so perhaps by using SOSL, you're preventing user searches from including the forbidden fields. Another approach might be to set up your search to target specific fields, and adding fields little by little until you find one that's causing this error.