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
0answers
20 views

LWC recordType name and description Selection component

I'm passing Map of record type - name and description from Apex to LWC and need to show the Name and description on UI with radio button to select name value. JS Part export default class xyz extends ...
0
votes
1answer
40 views

LWC dispatchEvent blocking the wire service call on a component

I am trying to get the records of some object X using wire service by passing a param to wire service. Below is the code, searchResults.js isLoading = false; boatTypeId = ''; @api searchBoats(typeId) {...
2
votes
1answer
31 views

LWC wired service getRecord won't rerender with reactive property

I am trying to use wire service to get the geo data from a record, and expecting the component will rerender every time wire service gets the data. This is how my component JS looks like, import ...
0
votes
1answer
42 views

Inline editing multiple records with lightning datatable in lwc [closed]

Trying to update multiple records with pagination using lightning - datatable in lwc. I am facing the below issues Uncaught Error: Invalid recordInput - When I edit the records and click on the save ...
0
votes
1answer
35 views

Wiring an apex method with static parameters vs calling it in connectedCallback

Getting data can be done in at least 2 ways in LWC: Call the apex method imperatively (e.g. in connectedCallback) Wire the apex method In my use case, data to be fetched is static and is not subject ...
0
votes
1answer
25 views

refreshcapex in LWC is not triggered when I am calling it from child component

<c-datatablelwc config={config} onrowaction={handleRowAction} > </c-datatablelwc> datatablelwc is a utility LWC which holds the standard datatable component, actually it is also has one ...
0
votes
1answer
30 views

LWC data-table component not updating with @track after data is changed

I have a requirement where the data variable on data table component is updated, but even after decorating it by @track, it is not updating on the UI //mycomponent.html <template> &...
-1
votes
1answer
32 views

How can we add hyperlink in cell in Excel file in LWC? [closed]

I export data in Excel file eaisly but now I need to add one hyperlink field like Account name , where when we click on hyperlink we can go to account records from Excel file.
0
votes
2answers
32 views

Can we use a variable to pass to the lightning/uiObjectInfoApi to enable dynamic object/field related component creation?

I'm creating a LWC (lightning web component) which allows any field to be displayed of any field type for any object, and to drop these into a flow page. I've run into a problem, where, I'd like to do ...
0
votes
0answers
28 views

How to retrieve record outside of a Lightning web component?

I want to retrieve a record (specifically, a user record), but outside of a Lightning web component. In other words, I want the equivalent of the getRecordData wire adapter in a form I can call when I'...
0
votes
0answers
32 views

LWC pub sub : subscribing component fetching stale data from apex

I am having two separate LWC components on the App Page. One is for adding Team members(Call it A 'members-skills') and other for showing all the team members(Call it B 'Team list'). Current ...
0
votes
2answers
40 views

Call the function if there is values returned by the wire method

I have a function in LWC which is getting invoked if Wire brings some values from Apex. but issue here i am facing is function is still getting called when data=[] Logic : Wire @wire(getRFCt, { crid: '...
1
vote
1answer
46 views

Using refreshApex with dataTable

I am trying to see what would be benefit of using refreshApex with DataTable component. I have recently tried this with Lightning web component superbadge challenge. I read of the use case in the ...
0
votes
1answer
46 views

Calling apex class method in LWC using @wire annotation

Awesome people , I am bit new to LWC coding . Please do let me know ,What i am doing wrong here. I need to display the count of Child Contacts in Html template in lwc. I am not able to display size in ...
0
votes
1answer
57 views

How do I make a part of the code run after apex call?

I'm calling an Apex method imperatively inside a wire function. The wire function is used to retrieve listview and it's data. I'm using data from this listview to retrieve pricebookentry fields. ...
0
votes
1answer
20 views

Using WiredFunction with parameter to display results in LWC

I have below component. I am trying to use wired function to get the data and show it using <template for:each={contacts.data} for:item="contact">. Referring the documentation with ...
5
votes
1answer
103 views

LWC Wire Over Multiple Objects - Summer '20 Behaviour Change

I have used code similar to this in my current production org. The fields array contains multiple objects to pass in to the @wire service. const fields = [ "Opportunity.External_Id__c", &...
0
votes
1answer
27 views

Is it safe to get currentPageReference in connectedCallback

I have a lightning component that may or may not accept query parameters. In the connected callback, I am trying to grab parameters from currentPageReference and if there are query params then I ...
0
votes
1answer
26 views

Value picked from a combobox isn't getting updated to another wire adapter unless I select another value from the combobox

I have a combobox populated with listviews from an object. If I select a listview, those records have to be shown in the table. But the records of a selected object are not being updated unless I ...
0
votes
1answer
33 views

In LWC, How do I dynamically show the records of a listview if the listview is selected from a picklist

I obtained listviews using getListUi wire adapter. I populated these listviews into a picklist. What I'm trying to achieve is if I select a listview from the picklist, the records need to be updated ...
0
votes
1answer
378 views

I'm getting this error: LWC component's @wire target property or method threw an error during value provisioning

I'm using getListUi wire adapter to get listViews of an object and trying to put it into a picklist. But I'm getting the following error. render threw an error in 'c:showListView' [LWC component's @...
0
votes
0answers
44 views

Chart JS is not loading in LWC

I am trying to display a bar chart using chartJS in LWC. On the page load the chart bar doesn't appear. If i do inspect element then it appear. Below is the code - JS - @wire( getOpportunities ) ...
0
votes
0answers
23 views

Child LWC loading before Parent

I have an parent component that fires an Apex Method. The method grabs data and passes to the child component, then the child component runs some logic and fires an alert. The weird thing is that when ...
0
votes
1answer
39 views

LWC wire service not provisioning results

I'm brand new to LWC (and components in general). I've been doing an online course and through that, I've built a simple component which has user input to search for a Lead. That's working okay, but ...
1
vote
1answer
204 views

Receiving error while iterating over a map in javascript in LWC - “e.map is not a function”

I am getting a different error and can not seem to figure it out now for a coupe of hours, Here's my code : createMapMarkers(boatData) { console.log('DATA :'+boatData); const newMarkers = boatData....
1
vote
1answer
60 views

Accessing record.data in wire property vs wired apex method that returns a collection

I'm trying to understand why there's a discrepancy in how you access data from a wired property depending on whether the data is a single record, or a collection (i.e returned by an apex method). ...
2
votes
1answer
36 views

Function decorated with Wire firing two times (no vars are marked as tracked)

Greetings StackExchange Friends! I have an odd situation. I have this same design pattern on the Contact Object, and I'm attempting to replicate it on the Opportunity Object. High Level: c-parent-...
0
votes
1answer
194 views

How get custom settings or custom metadata types in LWC component using getRecord?

I want to get custom settings or custom metadata types in lightning web components for creating reusable component. Can anyone suggest me how to get custom metadata types or settings records using ...
1
vote
1answer
76 views

LWC Pass RecordId to Parent of Parent

I'm trying very hard to build out something similar to the bike card example from Salesforce. I have a tile, list, and selector component in a hierarchy, and then another component Registration that ...
2
votes
1answer
25 views

Why am I getting unexpected results comparing currency field value in Lightning Web Component?

I have a currency(6,2) field on a custom object. I'm using @wire to get the value from the server, which if I query using SOQL the value is 0.0. However, I am getting unexpected results whilst ...
1
vote
1answer
92 views

LWC Wrapper List Update not reflecting in client side JS or Apex

I have an LWC as shown in below diagram. Whenever I update these checkboxes these changes are not being communicated to JS property variable any help would be really appriciated. Html <template&...
0
votes
0answers
14 views

LWC get notified when user finishes 'Edit'

I have a LWC component. I open the record edit page ('Event' is the object type) and i let the user edit a record like so: this[NavigationMixin.Navigate]({ type: "...
0
votes
2answers
90 views

getRecord, getFieldValue always return undefined values in LWC

Here is the javascript code of my LWC import { LightningElement, api, wire, track } from 'lwc'; import { getRecord, getFieldValue } from 'lightning/uiRecordApi'; import getAlertMetadata from '@...
1
vote
1answer
30 views

Why does refreshApex not execute when called imperatively?

Have have a button on a LWC, when clicked calls the following method: handleSubmitForApproval() { console.log('Submit for Approval clicked.'); submitForApproval({recordId : this._agreementId})...
2
votes
1answer
33 views

Lightning Web Component passing the particular value and retrieving the data in other component

Hi I have a requirement in which i am passing the data from parent to child component and need to fetch the particular data in the track property in child component. Parent Component. @track ...
0
votes
1answer
31 views

@wire method gives error 'Cannot read property 'keyword' of undefined' even though variable is declared

I have a @wire function which calls an apex method which should return some list of contacts. However I get the following error on page load: Uncaught (in promise) TypeError: Cannot read property '...
1
vote
1answer
121 views

When using @wire I can't get lightning-datatable to show the field value

I am using @wire and getListUi to get a list view of accounts. I have a lightning-datatable where, for now, I just want to display the name of each account. Relevant part of the template: <...
6
votes
2answers
149 views

Does @wire provide the latest updates to a record if changed on another tab, trigger, or other process?

I'm using getrecord via @wire to pull account data: @wire(getRecord, { recordId: '$recordId', fields: [ ACCOUNT_MARKET_FIELD, ACCOUNT_FAX_FIELD, ACCOUNT_TIMEZONE_FIELD, ...
0
votes
1answer
156 views

construct a URL with pageReference params from LWC [duplicate]

I am trying to construct a URL PageReference to a visualforce page passing in paramaters for Docusign use. This is working in Aura and also as a Custom URL button using a {!URLFOR} function, so I ...
0
votes
1answer
92 views

LWC Wire null check in order to return null or an empty array

Hi I need help on of my req in which i want some fields from Salesforce server to display in the LWC component on the basis of it i want to show one message in the child component, If there is no ...
0
votes
1answer
100 views

LWC How do I get the RecordType DeveloperName from getObjectInfo or from the passed object?

In my Lightning Web Component I am passed the accountId and recordtypeId amongst a few other fields. I need to determine which recordtype the account is in order to display different parts in the ...
0
votes
1answer
24 views

can anyone help me,i can't see the output when fetching the data from object in a lwc

<template> <lightning-card title="AllContacts"> <ul> <template if:true={responseReceived}> <template for:each={contacts.data} for:...
0
votes
0answers
53 views

How to convert getRecordUi to Page Layout on LWC

tl;dr - How do I turn the page layout info returned from getRecordUi into an end-user-friendly page-layout in an LWC? Background: I am trying to create a complete copy of a record's page layout in ...
1
vote
1answer
57 views

LWC not retrieving wired record data

I have a simple LWC component that isn't able to perform getRecord. As in the situation in this question, I need it to be invoked in a quick action, so it's wrapped in an aura component (if that ...
1
vote
1answer
46 views

Why does my hasResults getter not work?

After following along with Build Bear-Tracking app from Trailhead I am trying to use similar features in my own lwc app. Using a @wire adaptor I load results from an Apex controller, the method that ...
0
votes
0answers
153 views

Passing recordId to multiple child LWC from parent and displaying fields from them on parent LWC

I am relatively new to LWC and think I could probably handle this ask using Aura, but I really want to get into the new LWC direction so here I am. This ask is for Salesforce CPQ and Docusign. What I ...
1
vote
2answers
168 views

Assert Violation: Invalid template iteration for value Error in LWC template

I am trying to return a list of users through a search box to be used in a distributed marketing implementation. I have a container component that houses the search box component and the iteration ...
1
vote
1answer
21 views

unpackaged.zip getting in the way of pulling from scratch org

Hey guys I can't pull from my org because of this zip file Does anyone have any idea how to go about this I used the unzip command in command line, but that didn;t help.
0
votes
0answers
35 views

Meu componente LWC não carrega ao clicar no botão 'Novo' mais de duas vezes

bom, mudei meu botão 'NOVO' para chamar um componente Aura que chama um componente LWC, até que tudo seja bem, para que uma página lwc seja exibida na primeira renderização, na primeira chamada, se ...
2
votes
0answers
30 views

LWC: Record Id format when chaining wired properties?

The Understanding Wire Service doc says the following: You can use one @wire output as another @wire input. For example, you could use $record.data.fieldName as an input to another wire adapter. ...