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

ignore DUPLICATE_VALUE on sched item errors #1474

Merged
merged 1 commit into from
May 27, 2024

Conversation

aheber
Copy link
Contributor

@aheber aheber commented May 26, 2024

Changes

Ignore duplicate value error on Schedule Items caused by sharing isolation

Issues Closed

#375

@aheber
Copy link
Contributor Author

aheber commented May 26, 2024

I wasn't able to come up with a reasonably testable pattern for this to add an Apex Test.

Manual Testing Steps:
Create another user in the org using the Minimum Profile
Add a Perm Set that grants tab, read, create, edit to Account and Contact
Assign to new minimal user
Create a DLRS Rollup in Scheduled mode with the Contact as child object and Account as parent object, save and activate
Change Sharing Settings for the Scheduled Item object so it is Private for internal users. (Most occurrences are caused by Guest users on the external Private sharing).

Create an account with your full user
Create a Contact with your full user

Using the limited user, edit the contact in a way that would cause a Scheduled item record to be created. This should throw a DUPLICATE_VALUE error on save for the limited user. With this change in place it should succeed.

To make sure other errors are still surfaced, you can create a validation rule that always returns an error. Edit the child record again to create a new Scheduled Item record, this should throw a generally standard error message in the standard way.

@aheber aheber merged commit 5122ae3 into main May 27, 2024
3 checks passed
@aheber aheber deleted the feature/375-qualified-parent-id-duplicate-error branch May 27, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants