Skip to content
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

Guest user changes break DLRS Scheduled rollups #987

Closed
gbutt opened this issue Oct 5, 2020 · 7 comments
Closed

Guest user changes break DLRS Scheduled rollups #987

gbutt opened this issue Oct 5, 2020 · 7 comments
Labels

Comments

@gbutt
Copy link

gbutt commented Oct 5, 2020

Describe the bug
In winter 21 Salesforce is enforcing guest user restrictions in all orgs. These restrictions include:

  1. Guest user cannot own records
  2. Guest user can only obtain read access to records via Sharing Settings

It is this second setting that causes issues for rollups in Scheduled mode. This causes an insurmountable issue for DLRS rollups in Scheduled mode. Scheduled mode will insert or update in the Scheduled Items object. This object has a unique key based on Parent ID and CMDT ID. If the guest user triggers a Scheduled rollup, and a Scheduled Item does not exist, then the guest user is able to create a Scheduled Item without issue. If the guest user triggers a Scheduled rollup, and a Scheduled Item does exist, then an error is thrown when the guest user attempts to update that Scheduled Item.

To Reproduce
I have created this SFDX repo to reproduce this error
Steps to reproduce the behavior:

  1. Install DLRS version 2.12
  2. Create a form where a guest user can insert contacts under a known account
  3. Create a Scheduled rollup with Contact as child and Account as parent - screenshot of rollup config
  4. Using the guest user, create two contacts

Expected behavior
Both contacts are created without error.

Actual behavior
The second contact results in an error because the guest user cannot update the Scheduled Item created with the first contact.

Additional context
The only way I know to fix this issue is to change the code to execute without sharing.

@gbutt gbutt added the bug label Oct 5, 2020
@drewpiston
Copy link

Just wanted to chime in and say this is still an issue and affecting many of my clients.

The only workarounds I know of right now are:

  • change the rollup to be realtime (or full recalc every night)
  • have the guest site user insert data into an intermediate "holding" object and then use a scheduled flow (or other process) to create a Contact based on that intermediate object

@ritturoy
Copy link

ritturoy commented Mar 9, 2021

We face the same issue

@swift-ben
Copy link

We're also running into this with our clients and it's a pretty big issue as we have a lot of clients that use Sites to collect data. Any input or advice would be greatly appreciated.

@JimBTek JimBTek added this to the 2.16 milestone Jan 16, 2022
@JimBTek JimBTek removed this from the 2.16 milestone Jan 16, 2022
@evaLordNJII
Copy link

I am receiving the error message, "insufficient access on cross reference entity" and I am not a guest user, I am the System Administrator. Can anyone advise on how I can resolve this issue. The assistance is greatly appreciated

@streetyouth
Copy link

I believe I am experiencing this now on code that has been running for years using V4SF (Volutneers for Salesfroce) and DLRS together to help keep things straight. It is my understanding that this is because some child records that the guest site (V4SF) user are updating are in scheduled mode (incremental) and that the only workable solutions right now are to change the scheduled (incremental implied) to scheduled full or realtime.

@streetyouth
Copy link

This problem first manifest as "duplicate parents" error and then when I added read-only permission as "inadequate access / Read only access" error. Fixed by changing to real-time mode.

@aheber
Copy link
Contributor

aheber commented May 26, 2024

Duplicate of #375

@aheber aheber marked this as a duplicate of #375 May 26, 2024
@aheber aheber closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants