I'm using a lightning-record-form to display a custom object:

<template lwc:if={expedienteId}>
    <lightning-record-form record-id={expedienteId} object-api-name="Expediente_de_Negativos__c" mode="read-only" layout-type="Full" density="comfy" columns="1"></lightning-record-form>

expedienteId is not undefined or null, and I get the following error:

enter image description here

The logged in user's profile has read and edit access to the object. The following stackexchange post also asks about the same error , but had no answer: lightning-record-edit-form component used in Community returns error: "The requested resource does not exist"

The weird thing is there is another LWC in that experience cloud site, that also uses a record-form for another custom object and it works fine. No differences in code or permissions. Any ideas? Thanks!

  • Is the expedienteId a valid ID of a record of the given object type (Expediente_de_Negativos__c)? Does the contextual user have sharing access to that record?
    – Phil W
    Jan 8 at 22:13
  • 1
    @PhilW Hey phil! so yeah, the problem was because of sharing rules. The logged in user had to be a contact of the account associated with the record and I didn't know that (because of badly defined requirement). Thanks for the input! Jan 9 at 12:54

1 Answer 1


This can happen when you try to save an update to a lookup field using the ID of a record to which the contextual user doesn't have sharing access.

You must log in to answer this question.

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