3 votes
Accepted

I am new to LWC. I dont want to show alert message every time i refresh account detail page

Everytime the page is refreshed, the component goes through its lifecycle flow, so the wire method runs and if those conditions are met it will show the alert. In order to avoid this, you must set a ...
user avatar
  • 4,033
2 votes
Accepted

LWC @api is not working in experience builder while logged in as community user

If a class referenced directly from an LWC is defined as with sharing or inherited sharing Salesforce enforces sharing rules, so Apex code will run in the current user context. That's why with an ...
user avatar
  • 4,033
2 votes

LWC, Error "document.write is not a function" using third party JS

To add to @sfdcfox's comment and in case it helps anyone in the future, I ended up moving the request to an Apex class and returning the url of the response to the lwc component
user avatar
1 vote
Accepted

LWC, Error "document.write is not a function" using third party JS

In order to use document.write, you need to control the top-level HTML, as this function can only be called while the HTML is being parsed into the DOM through a synchronous script. After the ...
user avatar
  • 439k
1 vote

Does a Lightning Component know if it is in a Community or a standard Lightning Salesforce page?

A bit late for the party but this how I solved this issue: Assumption, you have created a Custom LWC component, in this example you'll see different URL's for Standard and Community pages. Let's start ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible