![]() ![]() We can't really know when these are done, since they are still Controlled By Parent (they haven't changed). ![]() This means that Account has the right Metadata, but sharing rules are still calculating for other objects. It seems like changing Account's sharing model creates other background jobs to update children (Contact, Cases and such) that are controlled by parent. ![]() We sometimes want to check if an object is really ControlledByParent. ExternalSharingModel, InternalSharingModel doesn't always play well with ControlledByParent objects.Įxample: A ControlledByParent Contact or Order will not appear as ControlledByParent, they will be the same as Account. We're testing sharing rules and models automatically, so we need to be sure sharing calculations are applied before moving on. Is there a way through an API to be 100% sure that sharing recalculations are completed? We tried querying ParallelJobStatus (which doesn't work), CronTrigger, AsyncApexJob and BackgroundOperation (which we think are not the right objects for this, and which return nothing anyway). However, when changing the Account object's sharing model, it seems like the metadata changes before the whole recalculation operation is complete (probably due to some related objects being recalculated). Previously we just queried the changed object's metadata (Edit: Using the Metadata field on the EntityDefinition object via the Tooling API) to check to see if the rules had been applied. We want to wait until all recalculation is complete. You can set the defaults separately for diff. One or more sharing operations has been initiated. Internal organization-wide sharing defaults set the baseline access for your internal users for your records. We're performing automated testing on scratch orgs and we want to change Organization-Wide Default Sharing for some objects.ĭoing so via the UI or via sfdx force:mdapi:deploy causes sharing rules recalculation, which is to be expected. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |