Pular para o conteúdo

Sharing at Scale

Este conteúdo não está disponível em sua língua ainda.

Chapter 22 of Securing Salesforce: Sharing and Visibility, Part 3: Beyond the Company and Beyond the Record. New to the course? Start with chapter 1.

Sharing that works for a thousand records can stall at a million. Not because the design is wrong, but because every grant is a row Salesforce keeps, every role and group change is work it has to do, and the work all lands on the same weekend: the reorganization.

So this chapter asks the question I ask in every review: how many will there be? Then it follows the answer into the share tables, the hot spots, the locks, the recalculation and the realignment, and ends with one review to run before go-live.

  • Sharing has a number of zeros. Records times grants per record is share rows. Count them before day zero, and grant to groups, not people.
  • Watch your granularity. Nobody sets out to make 100 million shares. One share per person per record, and the zeros do the rest.
  • The number tells you where to look; the behavior tells you how worried to be. A big owner that never moves is a fact. A big owner that moves every reorganization is a problem.
  • A simple change isn’t. Moving one role re-shares everything below it, and while it runs, Salesforce locks the group membership tables.
  • Every change is work somewhere. Know how each change recalculates, what it locks while it does, and what it leaves behind, including a deactivated user’s shares.
  • Change, change, change, recalculate once. A large realignment is a planned operation with a window, a rehearsal and deferred calculations.
  • Change how it grants, never what it protects. Performance is never a reason to open confidential data.

Here’s where the chapter starts: the arithmetic behind every share table.

Sharing has a number of zeros Sharing has a number of zeros. A million accounts, times ten shares each, makes ten million share rows on day zero. Two ways to load them: a batch class that works them out, running for hours or a day or two; or a bulk load of the share rows themselves, calculated ahead, which can also come from an outside system through the REST or Bulk API. Below, the lever that keeps the number sensible: share with a group, one row per account instead of ten, and change the group, not the rows. Footnote: count the share rows, not just the records. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.60.0", "built": "2026-11-23", "id": "DGM-SVA-SCL-01", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.5.0"} THE ARITHMETIC TWO WAYS TO LOAD THEM THE LEVER THE ARITHMETIC TWO WAYS TO LOAD THEM A million accounts the day-zero data load Ten shares each on average, person by person Ten million share rows before anyone logs in A batch class works them out: hours, a day or two A bulk load of share rows calculated ahead, or fed by another system through the API Share with a group one row per account, not ten; change the group, not the rows instead times makes loaded by or by Count the share rows, not just the records. HOW TO READ IT fewer rows © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

And where it ends: what to change when the numbers say no.

When the numbers say no When the numbers say no: what to change, and what never to change. Too many share rows: grant to groups, roles or territories, not people. Too many buckets for rules: territories, sharing sets or code. One big owner or parent: spread the ownership, real parents, no role for the big owner. A huge reorganization: a window, a rehearsal and deferred calculations. Data that isn't confidential: a public default, with no share rows needed. Confidential data that won't scale: a better design for it, never a public default. Footnote: how many will there be? Ask it before go-live, of every object. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.60.0", "built": "2026-11-23", "id": "DGM-SVA-SCL-06", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.5.0"} THE NUMBER SAYS WHAT TO CHANGE Too many share rows records times grants, person by person Grant to groups roles, groups or territories, not people Too many buckets more than rules should carry Change the tool territories, sharing sets or code One big owner or parent 10,000 or more on one Spread it real owners, real parents, no role for the big owner A huge reorganization hundreds of changes at once Plan it a window, a rehearsal, deferred calculations Data that isn't confidential everyone may read it anyway A public default no share rows needed Confidential data that won't scale private is slower Never a public default a better design for that object instead change change change change open it never How many will there be? Ask it before go-live, of every object. HOW TO READ IT not a lever © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Six modules, each standing on its own.

  1. Sharing Has a Number of Zeros. How many will there be; day zero’s arithmetic and the two ways to load shares; groups, not people; the week it took to delete 100 million shares; testing at volume.
  2. Skew, From the Sharing Side. One owner with too many records, one parent with too many children, one record everyone points at; when each hurts, and Salesforce’s fixes.
  3. Group Membership and Locking. What a role or group change sets off; the lock and its errors; granular locking and its limit; schedule, retry, go serial.
  4. When Sharing Recalculates, and What It Locks. What recalculates how, dated; the share locks and the Recalculate button; obsolete shares and deactivated users.
  5. Realignment Without an Outage. Deferred sharing calculations as a plan, in Salesforce’s order; what deferring doesn’t do; when it’s the right tool.
  6. A Scale Review Before Go-Live. One review, eleven questions; the levers when the numbers say no, and the one that isn’t a lever.

Then check what stuck with the study guide.

  • The numbers for every object with shared data: records, grants per record, owners, parents and buckets, now and in three years.
  • Who each grant goes to, and the tool that fits the number of buckets.
  • Who owns machine-created and unassigned records, so no owner or parent turns into a hot spot.
  • When roles, groups and rules change, in what order, and around which deployments.
  • The realignment plan: a window agreed with the business, a rehearsal at volume, and deferred calculations where they fit.
  • Which objects are confidential, so performance never becomes the reason to open them.

Beyond the exam: what AI changes. Agents add load to every part of this chapter: records they create and own, broad questions that run across everything a user can see, and role and group changes made in one sentence. Count them in the zeros, and put their changes through the same plan as anyone else’s.

Each module lists its own sources. Two to start with:

Next: Reviewing a Security and Sharing Model