Skip to main content
rg_'s user avatar
rg_'s user avatar
rg_'s user avatar
rg_
  • Member for 5 years, 9 months
  • Last seen more than 2 years ago
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
comment
FeatureManagement.checkPermission not returning expected result
@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?
revised
Loading…
revised
Loading…
Loading…
awarded
comment
Apex Condition on Transaction Security Policy: block large exports for users without a certain permission set
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!
comment
Apex Condition on Transaction Security Policy: block large exports for users without a certain permission set
thanks! that makes the code much simpler! I'm struggling to get tests written right now so hopefully that will simplify that as well
Loading…
Loading…
awarded
1
2 3 4 5