Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@cropredy ahhh that makes sense. Do you know how I would do this? I understand how to reference the :reportEvent.userId variable but not how to tell FeatureManagement.checkPermission to check the permissions of that user instead. Is that even possible? Or do I need to revert back to the previous code that was checking which permission sets were assigned to user exporting the report?
I'm having trouble getting this to work. I created a custom permission called Export_Reports, added it to a permission set and assigned a user to it. But using the line of code you suggested in my Condition class is returning false. Is there something else I need to do to ensure that FeatureManagement.checkPermission is checking permissions for the user exporting the report as opposed to any other user? I placed that line inside the private boolean evaluate(ReportEvent reportEvent){ function, just below the code that fetches the Profile. Did it need to go somewhere else? Thank you!