function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Supriya P 9Supriya 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
Umesh RathiUmesh Rathi
Hi Supriya,

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
Sachin30Sachin30
Hi Supriya

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.