You need to sign in to do that
Don't have an account?
Supriya P 9
LWC getRecord not working onload
Hi Everyone,
I have LWC component wrapped in aura component. My LWC component is using gerRecord to get the recordType info of the record.
The problem I'm facing is when i first time click the button, wire method is not called and on refresh of the screen it's working as expected.
Note: Two scenarios @wire is not getting called are below,
1) on first time load of screen
2) when screen is left ideal for few minutes.
Please let me know if anyone has any suggestions on this.
Thanks
I have LWC component wrapped in aura component. My LWC component is using gerRecord to get the recordType info of the record.
The problem I'm facing is when i first time click the button, wire method is not called and on refresh of the screen it's working as expected.
Note: Two scenarios @wire is not getting called are below,
1) on first time load of screen
2) when screen is left ideal for few minutes.
Please let me know if anyone has any suggestions on this.
Thanks
Instead of wire method, try calling your apex method imperatively in connectedCallback.
ConnectedCallback will be called everytime the component is loaded and inside it, you can call your apex method to get the required data.
Thanks
Did you find any solution to this problem. I am facing the similar issue where one of the three wired method is not getting called when click on the record link on list view. But it works fine if I go through the direct link to that page or I do a refresh after first load.
The console logs do not print anything which is there in the missed wired function. Tried clearing cache but no luck.