I have the LWC created for LWR Site that I am also using on Lightning quick action on Contact object.
When I click the quick action, I just get loading screen infinitely and LWC never loads.
here's the meta.xml
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>52.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightningCommunity__Page</target>
<target>lightningCommunity__Default</target>
<target>lightning__Tab</target>
<target>lightning__RecordAction</target>
<target>lightning__RecordPage</target>
</targets>
I also tried adding the LWC to record page and it doesn't let me save, just throws unknown error.
I read here that it was known issue but fixed by SF but I still see the issue in full sandbox.
It worked once and then suddenly stopped loading. How do I get LWC to load on quick action or record page?
HTML:
<template if:true={recordId}></template>
Simplified JS:
@api objectApiName;
@api recordId;
@wire(getRecord, {
recordId: USER_ID,
fields: [NAME_FIELD, EMAIL_FIELD, LANGUAGE_FIELD]
})
wireuser({ error, data }) {
//console.groupCollapsed('User Detail');
if (error) {
this.error = error;
this.showUnexpectedError = true;
this.isLoading = false;
console.error('Error fetching User information : '+JSON.stringify(error));
} else if (data) {
this.name = data.fields.Name.value;
this.email = data.fields.Email.value;
}
spinner
doesn't load and none of the lifecycle hook'sconsole.log
statements. I had referred to the answer you linked but let me try that again and I will get back. thank you for taking time. Also, I am usingrecordId
in HTML so I thought I do not need to set it in renderedCallBack.import basePath from "@salesforce/community/basePath";
because I was using my LWC in a experience builder site, in salesforce it just keeps spinning and doesnt actually load the basepath. seems like a salesforce LWC bug I am going to figure out a way to submit that to SF.