0

How to enable usage of RecordEditForm's onSuccess for Guest User Profile?

I am creating a case submission form that needs to be used by both authenticated and guest users. I am using a record edit form that will take in desired fields and create a case on submission.
I am setting onSuccess to a function that will basically capture some of the case information being returned in the success event (the case number, id, description, etc), and also set a boolean var to true which will display another part of my component.

The onSuccess function is working correctly for authenticated users but not for guest users. For guest users, the case is being created on the submit button press, but a success event never seems to occur (as I have logs in the handleSuccess function which do not appear in the console).

I have tried enabling sharing rules for the specific cases that this guest user profile would be creating. I have also given the user profile permissions to create and read Cases.

Are there any other permissions required to access success events? Or are there any other permissions I might need for guest users to use RecordEditForm’s onSuccess function?

Thanks!

UPDATE:

I added an onerror function that logs the error event (which I originially assumed wasn't happening since a case was created), and it says the error is:

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
at Function.invokeGetter (<anonymous>:2:14)

What does this mean in this context?

1 Answer 1

0

Guest user needs acces to Read Cases. Do it through a case sharing rule, type: Guest user access.

https://www.learnexperiencecloud.com/s/news/guest-user-record-access-platform-vs-code-based-sharing-20Y1U000000UkagUAC

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .