-
Notifications
You must be signed in to change notification settings - Fork 17
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
Idea: More flexibility in definition of criterias #16
Comments
Very nice to read your thoughts around this - I've been through some very similar lines of thinking myself! As a long term goal, I think this would be a good place to get to, though it would be a significant undertaking to do this well and in a way which provides parity with formula fields. There's a few things I think would need to consider:
I feel to deliver this and recommend this as the best approach we'd need to have equivalent capabilities in each of these areas. There are a few things I've been thinking about and found which are worth considering:
So yeah I think it's a great idea, but may be quite a big task to get there. The core of FormulaShare is pretty involved and this would touch some quite fundamental elements - with the nature of the app I think it's best we're super cautious about how these kind of core changes are introduced as the risk is very high if major issues are introduced in production orgs, but definitely supportive of this as an approach and something to work towards. Great to see our thinking is aligned! |
For my current idea I have to go a bit further. By the way: During the research for a solution to my problem I became aware of FormulaShare-DX in the first place. I was looking for a solution for dynamic record sharing that adapts the Salesforce standard but allows extensions like using all(!) fields on an object and removing limitations (i.e.: max. 500 sharing rules for one object). So I wanted a solution that could be used in the same way as the Salesforce standard for defining sharing rules, with the same schema: record owner or criteria-based sharing rules, definition of criteria and who the records are shared with.
Am I correct in assuming that FormulaShare does not currently support this, right? My understanding: In FormulaShare it is necessary to specify the ID for a user, role, etc. in a specially created field, so that FS knows that this record is shared with X.
Wouldn't it be more flexible, without using additional fields, to define the criteria (which records should be selected) directly in FS? I chose exactly this approach a few weeks ago in a proprietary development. That was pretty tough for me, since it was the first time I had dealt with Apex releases in this intensity.
From today's point of view, I learned a few things that I didn't consider during my conception phase because Salesforce takes care of it itself 'under the hood':
Changing role assignments must also result in a recalculation of approvals.
About the architecture: Based on this example (https://www.apexhours.com/apex-design-patterns-leveraging-the-flexibility-of-custom-metadata-types/#comment-14665), I was able to outsource the definition of criteria to custom object. Contra: This way of outsourcing the configuration allows only AND links and no OR links. I didn't find a way to develop such a dynamic boolean argument in such a short time. However, I am convinced that, even though there may be some limitations with regard to the nesting of boolean links, it should be possible to use AND and/or OR links. After all, this is what the Salesforce standard offers in the definition of sharing rules. So it must also be possible to adapt this approach!
As you can see on the following screenshots, I lacked the knowledge that custom metadata types are able to use metadata relationships (like in FS) at the beginning of the development, so I decided to use custom objects. From the background to translate the information of technical roles, usernames etc. with an apex trigger into technical Ids.
With the following screenshots I hope the idea behind my description becomes clearer:
Best regards,
Christian
The text was updated successfully, but these errors were encountered: