Ask Search:
Grzegorz Adam WróbelGrzegorz Adam Wróbel 

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.
User-added image

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.

Thank you.

Best Answer chosen by Jayson (salesforce.com) 
Grzegorz Adam WróbelGrzegorz Adam Wróbel
The is resolved by adding a guest user as a target queue member...

All Answers

Meghna VijayMeghna Vijay
Hi Grzegorz,

Does the lightning component exist in your regular sandbox community?
 
Grzegorz Adam WróbelGrzegorz Adam Wróbel
Hi Meghna,

Of course. As I wrote - it works fine for Admin (he does not receive the "The requested resource does not exist" error).
Grzegorz Adam WróbelGrzegorz Adam Wróbel

Update:

On onerror event for my lightning:recordEditForm I am getting the following:

  • error.status = "404"
  • error.statusText= "Not Found"
Meghna VijayMeghna Vijay
@Grzegorz,
Ca you post screenshot of Controller.js when you are calling onerror event?
 
Grzegorz Adam WróbelGrzegorz Adam Wróbel
Hi,

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...
Grzegorz Adam WróbelGrzegorz Adam Wróbel
The is resolved by adding a guest user as a target queue member...
This was selected as the best answer
Itai ShmidaItai Shmida
Hi @Grzegorz Adam Wróbel

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?

Thanks
Itai Shmida