MAJOR RELEASE

Another year flies by... birds are blooming and flowers singing, and it's time for our annual major release!
We're happy to be bringing you more features and fixes this year, with a record (we think) of user requested improvements. We hope there's something for everyone here and we'd love to hear any feedback, and of course suggestions for future releases.
What do I need to know?
The Spring release includes new enhancements, but has no expected impact to your existing functionality. No changes are needed unless you'd like to make use some of the exciting new features.
Spring '25 changes will be rolled out to sandboxes and production environments using supported versions of FormulaShare between February and April 2025 on the schedule below:
- Direct upgrade from AppExchange: From February 28
- Automatic sandbox upgrades: March 10 – March 17
- Automatic production upgrades: April 21 – April 28
New Features
Our focus this release has been on iterative improvements which help FormulaShare more flexible than ever.
Manage Full Recalculation Batch from the FormulaShare Rules page
Available with: Unlimited, Enterprise and Lite
The schedule for the Full Recalculation batch can now be managed directly from the FormulaShare app:
- Simplifies initial setup, schedule the batch in a few clicks
- Allows admins to easily review when the batch will next run, and which user this runs as
- Enables quick rescheduling of the batch as either a daily job or one running on specific days of the week
- Additional information is provided on the purpose of the batch job, and the option to use Targeted Scheduled jobs in addition or instead
- Warning messages are shown when the batch is not scheduled, with a clearer explanation of the impact and call to action to resolve

Streamlined setup for flows and triggers
Available with: Unlimited, Enterprise and Lite
A button on FormulaShare Rules page provides an overview and quick links to set up record-triggered flows and trigger code:
- Summary of object which can be used to efficiently apply sharing in real time
- Overview of steps to create a record-triggered flow from the FormulaShare flow template
- Button to open a draft of a new record-triggered flow using the template
- Overview of steps to implement real time sharing using an apex trigger
- Sample trigger code and test code, ready to copy and reuse!

Assess sharing for just a subset of rules
Available with: Unlimited, Enterprise and Lite
Either triggers or flows can now be configured to apply only specific rules. This can be useful to reduce processing overheads to fine-tune performance, especially when using the options to submit records for full assessment.
Restricting in this way is possible from either triggers or from flows. From flows, configure this by deselecting rules you don't want to apply in the Apex Action:

From triggers, provide a list of rule names as an argument to either the new restrictToRules or excludeRules method on FormulaShareHelper:
sdfs.FormulaShareHelper helper = new sdfs.FormulaShareHelper();
helper.excludeRules(new List<String>{'Country_Finance_Manager_Read_Access'});
insert helper.getSharesToInsert();
delete helper.getSharesToDelete();
Control behaviour when no matching records
Available with: Unlimited, Enterprise and Lite
It's now possible to control what happens when a record in a shared object includes a value in a sharing field, but no matching entity is found. This applies when either:
- The value used for sharing doesn't match a user, role or group in the org
- A rule shares based on values in custom metadata records, but no custom metadata record can be identified from the shared record
In each of these scenarios, it's now possible to select one of the following behaviours:
- Log an Error - Create a FormulaShare Record Log error indicating that no match was found. This is the default for new rules and any existing rules set up before these options were added
- Share to a Default User, Role or Group - Specify who should receive access in the event that no match is found
- Take No Action - Treat the non-matching record as if the field wasn't populated at all - FormulaShare won't share the record and won't log an error
Previously, errors were always logged.
An example of the configuration for a rule which shares based on a custom metadata record is below:

The configuration in the screenshot shares to a default Global Finance Manager role if there is no matching custom metadata record. If a custom metadata record is found but, has the field "Finance Manager Role" set to something other than the name of a valid role, an error will be logged.
These options provide more control over non-matching record behaviour and allow you to configure rules to make sure only valid errors are captured.
A few examples scenarios where that the new options (sharing to defaults and taking no action) could be useful:
- A field used for sharing indicates a country, region or team, but only certain countries, regions or teams have roles, public groups or custom metadata records configured in the org. In this case "Share to a Default Role/Group" could be used share to a default org-wide entity, or "Take No Action" could be used if sharing would be in place through other means outside the scope of this rule.
- A user lookup field is used for sharing, but users who have been deactivated shouldn't be cleared from this field. In this scenario, it may be preferable to share to a default user or avoid applying sharing or creating an error log.
- There are legacy records in a shared object which indicate roles or groups which have since been removed from the org. In this case, it may be appropriate to share these with a default team or role, or to skip application of the rule completely
Minor Enhancements and Fixes
Our focus this release has been on iterative improvements which help FormulaShare more flexible than ever.
- Share custom objects to record owners as part of user rule sharing
FormulaShare rules which share to users may have records shared to the owner. Previously, share records would not be created for the record owner, meaning if ownership changes at a later point the user and triggers are not set up on the object, the owner could lose access to the record until a FormulaShare batch including this record runs. Going forwards, user rules on custom objects will now create explicit sharing to record owner when they're specified in the sharing field to ensure access is retained. Note that standard objects do not support sharing to record owners, so functionality for standard objects is unchanged.
- Allow Default Account / Opportunity team sharing to share Account records
Until this release, an issue prevented creation of rules which share Account records to a user's default Account or Opportunity team. This has now been resolved meaning this sharing option now works on Account as well as other objects
- Warning shown on Targeted Calculation Jobs list when an object which has Targeted Calculation Job sharing disabled
When an object has been disabled for Targeted Calculation Jobs, any existing jobs will no longer be run, but the configuration won't automatically be removed. This warning helps make it clear which jobs won't be run in this circumstance.
- Indicate Running User and Rules Applied on Record Logs
A new "Running User" lookup on FormulaShare Record Logs indicates which user initiated the tigger, flow or batch sharing operation, and a Rules Applied field shows which rules were in the scope of the assessment being carried out for the record.
After upgrading, these fields won't automatically be included in the layout. If you'd like to reference these add fields to the page layout or FormulaShare Record Logs list view in your org.
- Warning if a sharing reason name is already in use on a rule
A warning message will now be shown on the rule detail page indicating if a sharing reason with the same name has been used on another FormulaShare rule. This makes it clear which sharing reasons are still available for use:
- Support larger volumes of targeted calculation job logs
Targeted calculation jobs can be configured to run as often as once per minute, and will create one FormulaShare Batch Log per run and one FormulaShare Rule in Batch logs for each rule processed in the run. When the number of FormulaShare Rule in Batch logs stored in the org exceeeded 50,000, this had prevented the FormulaShare Rules page from displaying correctly. This has been addressed and larger volumes of both kinds of logs can be stored without impacting FormulaShare functionality. Note that when running rules very frequently, we recommend configuring retention settings in app-wide settings to ensure logs are deleted in a timely way
- Fix for related object rules with custom metadata mappings which share based on a common parent object
Until this release, rules could not be created which share based on fields on a custom metadata record which match records which have a sibling relationship to the shared record (i.e. the users, roles or groups to share with are set on a custom metadata record, which match values in records which have a lookup to a parent of the shared record). This has been fixed and sharing of this kind is possible.
- Allow more specific checks in local test methods
FormulaShare now helps you verify which objects its apex methods were called for in your tests, allowing you to be more targeted in your assertions. The new global static method FormulaShareHelper.wasCalledForObject(SObjectType typeToCheck) allows you verify whether FormulaShare was called for a particular object during the current transaction.
- API version updates
API versions of all classes and components in FormulaShare have been updated to 60.0 or higher. Whilst no version-related bugs have been reported or identified, this ensures clear compatibility with recent platform changes such as International Components for Unicode (ICU) locale formats and Platform API Versions 21.0 through 30.0 Retirement.
Note that some of these updates have been introduced iteratively to the live version on the AppExchange. If you're using a version installed since May 2024 you may have some of these changes in place already!