Questions tagged [lwc-wire-adapter]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0
votes
2answers
32 views

LWC: wire apex to property with @api param value

Is there a way to get result from apex method if param is @api value (that comes from parent)? like this: @api trip; // comes from parent @wire(getTickets, { recordId: '$trip.Id' }) tickets; or how ...
0
votes
2answers
55 views

LWC: wire and getRecord, get field values

It's crazy. I'm gonna crash the table. How to show variable {name} ? Iterated component html: <template> <p>{idx} </p> </template> Properly shows: But When i try to add ...
0
votes
1answer
49 views

LWC / Get fields values with getRecord and wire

I can't get fields values with getRecord adapter. Component shows passed recordId only. Where is the problem? Parent HTML: <template> <lightning-card title="My Trips"> ...
1
vote
3answers
97 views

Callback function in LWC

I have 2 picklist(Combo-box). On change of value in the 1st combobox - depending on the value returned from the controller - i need to render or hide the 2nd combobox. I'm using refreshapex to get the ...
1
vote
1answer
52 views

Renaming LWC const variable breaks component behavior

I was surprised to find that changing the variable name for a JS const from fields to CONTACT_FIELDS caused my component to stop functioning. (I realize this is a naming convention for Java constants, ...
0
votes
1answer
61 views

Data not returned by wire service

I am unable to get data using getRecord method if wired to a function. The same call work when it is wired to property. I have given the code below. When wired to function, error and data (in ...
0
votes
0answers
46 views

LWC: getPicklistValues wire adapter

I want to call getPicklistValues wire adapter method from another method, as I want to show/load the picklist values on complete of another function. But wire methods can be called on page load and ...
1
vote
1answer
50 views

Does LWC @wire works with custom classes?

I'm trying to use @wire with a method that returns a list of my custom wrapper class. The list is returned, but the items have no fields. When I'm using @wire with List of SObject, everything is fine.
2
votes
1answer
99 views

How to avoid error Cannot read property of undefined using two LWC Wired properties

How to avoid error Cannot read property of undefined using LWC Wired properties but to display two properties? afterRender threw an error in 'c:tryc' [Cannot read property 'x' of undefined] HTML file ...
0
votes
0answers
40 views

Lightning Web Components - track user (insert visit record) after login

We use lightning communities. I am working on building a new LWC component, where I can place it in the page footer. The goal of the component is simple: once the user logs in, visits a page in the ...
0
votes
0answers
29 views

How to Pass record id from community page to another?

I am using navigation mixin for navigating to a community page from other community page- this[NavigationMixin.Navigate]({ type: 'standard__namedPage', attributes: { ...
2
votes
1answer
199 views

Record Type Selection in LWC

I'm trying to create record Type selection screen in LWC, but getting this error afterRender threw an error in 'c:createContact' [Cannot read property 'recordTypeInfos' of undefined] HTML: <...
1
vote
2answers
127 views

Where do I put isLoading=true in a @wire method?

I'm creating an lwc, and I've been using an imperative call to get data, where it's easy to include setting a property isLoading before the call, so that a spinner shows while it's getting the data. ...
0
votes
0answers
120 views

LWC (enclosed by Aura component) @api property becomes undefined after Save

I have a flow where I am utilizing an Aura component (b/c LWC isn't supported by flows). The LWC I created is enclosed by the same Aura component. Now, the LWC has an @api exposed property that the ...
1
vote
2answers
115 views

How to use wired function?

I'm learning to write Lightning Web Components (and also rather a novice at modern javascript). I'm trying to make the code on the LWC Developer Guide page Handle Errors in Lightning Data Service ...
3
votes
1answer
609 views

Unable to pass parameters to wired property in LWC

Unable to pass parameters to wired property in LWC. I have a standalone app <aura:application extends="force.slds"> <c:abc a="a" b="a,b,c" c="c" /> </aura:application> and ...
3
votes
2answers
449 views

LWC Force Refresh Wire getRecord

I notice one problem with @wire(getRecord, { recordId: "$recordId", fields: FIELDS }). It normally works good, automatically changes when a field changes in the page but, if we have a roll-up summary ...
3
votes
3answers
173 views

LWC mass delete records using deleteRecord from lightning/uiRecordApi

I am using deleteRecord adapter from lightning/uiRecordApi. It works fine when I give it a record Id, but a would like to give it a list of records id to delete all of them at once. What I have done ...
3
votes
0answers
262 views

LWC Handling Multiple Dependents @Wire methods

How we handle dependent wire in LWC? For example : @wire(getObjectInfo, { objectApiName: OPP_OBJECT }) objectInfo; @wire(getPicklistValues, { recordTypeId: '$objectInfo.data....
1
vote
1answer
122 views

Lightning Web Components - I am having problems getting the PicklistValues for the Status field in the Campaign object

I have the following code import { LightningElement, wire, track } from "lwc"; import { getObjectInfo, getPicklistValues } from "lightning/uiObjectInfoApi"; import CAMPAIGN_OBJECT from "@...
0
votes
1answer
79 views

Can I use getListUi method with Related List Views?

Apologies if this question doesn't make sense. I'm fairly new to Salesforce and LWC. I am creating a component for the Service Console on the Account page. Essentially I want it to return a list of ...
5
votes
1answer
746 views

LWC : passing parameter to getrecord

I try to create a simple LWC to display an iframe whose url should be store in a custom field of the object So my html is <template> <lightning-card title="URL" icon-name="custom:...
3
votes
1answer
583 views

Salesforce LWC - Pass standard object to Apex Class [closed]

I am trying to pass a Case SObject to apex class as parameter, but is not working. I did not see the System.debug on the console. Why? //wire the record @wire(getRecord, { recordId: '$recordId', ...
1
vote
1answer
68 views

getListUi returns old list view

I am using following LWC wrapper in aura to get list views: LWC: import { LightningElement, wire, track, api } from 'lwc'; import { getListUi } from 'lightning/uiListApi'; export default class ...
0
votes
1answer
139 views

To call apex method every time when attribute changed

I have 2 components: - parent is Aura component - child is LWC component child component surround with aura:if and rendered in particular case. I need to call Apex method every time when 'param' ...
1
vote
1answer
43 views

Consume LWC's getListUi wire in Aura component

I want to grab list views in Aura by sobjectType and list view name. I already made a component that does a request, but fail to expose the data to Aura. Attribute change handler never fires and upon ...