The requested resource does not exist
I have a custom lightning component inside my public community. The component creates a Case using lightning:recordEditForm standard component.
When a guest user clicks a button to create a new Case he gets "The requested resource does not exist" error in <lightning:messages />. The case is still created in the background.
What can be a cause of this error? My guest user profile has a permission to create Cases. Moreover, it works fine for guest users in my Scratch Org community while it fails for guests on regular Sandbox community. There is no problem with logged admin user so I am assuming it's about some permissions I cannot localize.
Does the lightning component exist in your regular sandbox community?
Of course. As I wrote - it works fine for Admin (he does not receive the "The requested resource does not exist" error).
On onerror event for my lightning:recordEditForm I am getting the following:
- error.status = "404"
- error.statusText= "Not Found"
Ca you post screenshot of Controller.js when you are calling onerror event?
The "onerror" event is an event of the standard lightning:recordEditForm component. You can see more details here: https://developer.salesforce.com/docs/component-library/bundle/lightning:recordEditForm/specification
After some investigations it turned out that the issue seems to be connected with Case owner.
When creating new Case record using the lightning:recordEditForm:
1. A new Case record is created
2. Case owner is changed to one of a Queue by Workflow Rule in this case
3. lightning:recordEditForm onerror event is called
In short, it seems that lightning:recordEditForm fails when there exist a Workflow Rule using Field Update Workflow Action that updates a record Owner...
I am facing a similar problem with changing the ownerId in a trigger or process builder - after a case has been added from a lightning component that is in my community.
Here is the problem description: https://salesforce.stackexchange.com/questions/275872/lightning-record-edit-form-component-used-in-community-returns-error-the-reque
Maybe you can help me?