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

Ability to manually recalculate sharing for specific records #31

Open
LawrenceLoz opened this issue Apr 4, 2021 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@LawrenceLoz
Copy link
Owner

  • Component should be available to add to any Lightning record page to show sharing applied by FormulaShare (custom objects only) and allow any user to request recalculation
  • Recalculation should happen in real time, and UI should indicate when recalculation is in progress and complete
  • List of current sharing should indicate apex sharing reason, corresponding rule label and shared entity
  • It would also be helpful to be able to programmatically specify a set of records and initialise recalculation for this set. If practical it would be good to select a design approach which also supports this use case
@LawrenceLoz
Copy link
Owner Author

The manual and programmatic requirements could potentially be addressed by exposing a static global set which can be populated with IDs of records to be processed by FormulaShareHelper().

A constraint to consider for manually requesting recalculation through a component - calling logic directly from LWC (or calling directly in any way from the package) is only possible if "with sharing" is applied to pass Salesforce security review. Users who don't have modify all on the object or are the record owner are not permitted to update sharing, so this approach wouldn't be viable.

We could sidestep this constraint by having the component add record ID to the set and then make an update to the record. The update should fire the subscriber's trigger which will execute FormulaShareHelper() without sharing.

@LawrenceLoz LawrenceLoz added the enhancement New feature or request label Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant