BUSINESS OR TECHNICAL RESULT:
Clouds: Sales Cloud | Industry: Maintenance Technology | Region: Germany
Salesforce Custom Development and Support
PRÜFTECHNIK Looking to Streamline Partner Community Record Sharing
PRÜFTECHNIK stores large amounts of object records in their Salesforce org such as Accounts, Contacts, Opportunities, Cases, Devices, Services & Demos, Leads, and about 2 GB of Activities data. The client set the default record access to Private, meaning that only the record owner could have Read/Write access to this record. What’s more, they used territory-based sharing rules to grant a wider access to certain records to a selected set of Partner Community Users, which they did through a standard UI. Given that PRÜFTECHNIK had a lot of data in their org, they had a hard time managing access to Salesforce records using criteria-based sharing rules, that is to say creating sharing rules and running other sharing operations through their standard UI such as updating a sharing rule, deleting and its recalculation. For one, if they needed to share a record to, say, 10 partner users, they had to create as many separate sharing rules as they had partners. What’s more, they were unable to create a new sharing rule before the recalculation was completed.
Along with that, the standard functionality didn’t allow the client to assign additional access to Activities — tasks and events. These were the main pain points PRÜFTECHNIK was looking to overcome.
VRP Consulting Provides Actionable Solutions
To make things easier for PRÜFTECHNIK and solve their pain points, VRP Consulting came up with a custom solution for adding and recalculating sharing rules. To that end, we created a relevant data model for storing sharing rules and customizing criteria, two dynamic Visulaforce pages for adding sharing rules of both types — owner-based and territory-based sharing rules, and a relevant business logic.
The dynamic Visualforce pages allow PRÜFTECHNIK to specify:
- Portal roles that are to be given access to certain records
- Criteria used to grant access to records
- The access level for objects (Account, Contact, Opportunity, Case, Devices, Services & Demos, Lead, Activities) for all Business Units and for a specific Partner Account
- Sharing rules for Account and child objects based on territory, owner and a specific Business Unit
The business logic that we developed enables sharing rules recalculation for a small volume of records, specifically it:
- Gives access to relevant records when new sharing rules are added
- Automatically removes the sharing access to records created by the sharing rule when it is deleted
- Automatically recalculates access to records when the sharing rule is updated
- Shares records based on the sharing rules when new records are created (Account, Contact, Opportunity, Case, Devices, Services & Demos, Lead)
- Recalculates access based on sharing rules when records are updated
What’s more, we implemented the Batch Apex class to process large amounts of records asynchronously in batches. The Batch Apex sharing recalculation was created for six objects: Devices, Services & Demos, Account, Contact, Opportunity, and Cases.
Additionally, VRP Consulting created Apex Triggers on Accounts and Leads that are intended to check if a created/updated record meets the territory criteria.
Along with that, we designed a Lightning component that provides access to Activities for specific User Roles based on the configured sharing rules. When a user enters any record, our Lightning component analyzes the sharing rules and then gives users either a View Only access or displays “Edit” and “Delete” buttons based on the level of access assigned to them.
Based on the goals PRÜFTECHNIK set and their business needs, VRP Consulting delivered a robust solution that produced the desired results, specifically:
- Full automation of record sharing process
- Error-free data entry and data integrity
- Enhanced usability for Partner Community users