Questions tagged [lwc-wire-adapter]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
13 views

Wrapper class variable show as undefined in LWC

I have been stuck on this for a few hours, hope someone will be able to help me with this. I simplified the code as well. This is the error I am getting => [Cannot read property 'firstNameFieldLabel' ...
1
vote
1answer
39 views

LWC working for sysadmin, but not getting data via @wire for other users

So my Lightning Web Component is working perfectly for me (sysadmin), time to test it for other users. Turns out that some things are working and others are not. What is working: calling Apex methods ...
0
votes
1answer
66 views

LWC wire methods execution sequence : Passing one wire method result as parameter to second wire method [duplicate]

I am having two client-side controller methods, How to pass the response of the first wire method as a parameter to the second wire method. The second wire method is dependent on the first methods ...
0
votes
1answer
30 views

Unable to Insert Record with the Record Type - LWC

I am new to LWC, i have few RecordTypes for the Service object, i am trying to insert the record with the record type (Mobile Service Record Type), but with the below code record is getting created ...
0
votes
0answers
50 views

@wire returning undefined for data and error

import {api, LightningElement, track, wire} from 'lwc'; import fetchAllAccounts from '@salesforce/apex/ContinuationCallAuraLWC.fetchAllAccounts'; const columns = [ {label: 'AccountName', ...
0
votes
2answers
41 views

Wire service is not fetching the data from Apex class

I am trying to use wire service to fetch my data but it is not returning anything I am also trying to console log but it is of no use can somebody please help me where I am wrong. This HTML <...
0
votes
2answers
66 views

lwc getFieldValue error for Custom Field on Event object

tl; dr - How do I access a custom field value on the Event object via lwc? Update at bottom of page Overview I am attempting to create a lightning web component that displays the field values of a ...
0
votes
0answers
27 views

How to render fields based on recordtype in Lightning Web Component

Here I have 2 record types for an Account object. let call it as A and B. If the Account's record type is A, then the set of the field should not be visible. How to achieve this functionality. How to ...
0
votes
1answer
28 views

update multiple “B” sobject records with newly create “A” sobject record Id in lwc using uiRecordApi

i am trying to update the B object records with newly created A object record Id by using this approach in line multiple rows edit. i am able to created A object record successfully. then i build the ...
0
votes
0answers
22 views

What is Equivalent of $A.getReference(“$Label.c.” + customLabelName) in LWC? [duplicate]

In Lightning Component we can get the custom label value dynamically by passing parameter using below - $A.getReference("$Label.c." + item); What is equivalent in Lightning Web Component ? How to ...
0
votes
2answers
82 views

Display data from multiple Column to Multiple Rows in LWC

I have a custom Records which has follwing Columns. Father First name, Father Last name, Father Email, Father Cell, Mother First name, Mother last name, Mother Email, Mother Cell Guardian FirstName, ...
5
votes
2answers
128 views

Process results from two different @wire methods after the @wires are finished

I have two different @wire methods that are calling Apex methods to get different results from two different objects. After this information has been retrieved by each @wire respectively, I'd like to ...
1
vote
1answer
115 views

getFieldValue loading data is very slow

I have a LWC user information form is embedded in Visual force page Using getFieldValue, retrieving the data and displaying in UI. When i add the below code in html file browser got hanged and ...
2
votes
1answer
45 views

Trying to combine wire with lightning-datatable to obtain field labels

What I am trying to accomplish: in a multi-language org, I want to have a datatable in a Lightning Web Component that uses the field labels as defined in Salesforce, so that the proper labels are ...
1
vote
1answer
49 views

LWC to display records grouped by RecordType Name

I'm trying to get a list of all CaseT records under their respective recordtype name in a lwc component. So, CaseT Recordtypename 1 CaseT A CaseT B CaseT C CaseT Recordtypename 2 CaseT X CaseT Y ...
0
votes
1answer
56 views

Salesforce LWC aura_prod.js:3 Uncaught (in promise) TypeError: Cannot read property 'Symbol(ViewModel)' of undefined

I am getting below error when i try to pass data to apex. I did everything to debug but unable to find root cause. aura_prod.js:3 Uncaught (in promise) TypeError: Cannot read property 'Symbol(...
1
vote
0answers
61 views

getRecord fails intermittently in simple LWCs

I'm finding that using getRecord fails intermittently - I've seen this in multiple orgs now and I'm not sure if it's something I'm doing wrong or if there is a bug in the wire service. Here is a ...
2
votes
1answer
48 views

lwc wire server side changes not detected

I have a lwc component with apex service wired. This apex service takes an parameter. Since it is a wired service, I need to mark it as Cacheable=true on the apex controller. On the UI Wired service ...
1
vote
1answer
66 views

Force refresh LWC component to get latest changes from Server [closed]

I have a Quick Action, which invokes lwc, which is used to update a record. This component contains a custom multiselect lookup, which get populated with default value based on click of Quick action. ...
0
votes
1answer
41 views

How to show ToastEvent only when specific field on the opp changes?

Problem: I have an LWC that is attached to an Opportunity and uses the getRecord method with the @wire decorator. This component is grabbing related information from a payment method that has been ...
1
vote
0answers
49 views

How to get Translated picklist vlaues in LWC without Apex?

Based on example from here, Also from the official documentation and a question asked previously here I am able to get picklist values in my lightning Web Component. But in one of the field I have ...
0
votes
4answers
111 views

two wires (getRecord, getObjectInfo) in a single in Lightning Web Components (LWC). Need to chain one after the other

I'm trying to fetch the record values and show the label of the fields that have null values on the record detail page. The code snippet is as below: objectInfo = {}; @wire(getObjectInfo, {...
2
votes
1answer
39 views

Passed parameters to wired property in LWC do not work when data changes and tracked parameter changes

I have a @wire that works well in most cases. @track searchTerm = ''; @track searchType = 'All'; @track selectEvent = '' ; @track registrations; @wire(searchRegistrations, {searchTerm: '$searchTerm',...
0
votes
2answers
59 views

Owner name is not getting populated in LWC by using @wire decorator

XML file: <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="partnerOpportunityRecordRead"> <apiVersion>47.0&...
1
vote
1answer
47 views

Reactive property in @wire notation from other @wired method

DISCLAIMER : I know there are better ways to get the current User Id, I am just writing this up as example to illustrate the issue I am facing. Let's say I have two apex methods that are @AuraEnabled ...
7
votes
1answer
136 views

Testing LWC with multiple @wire getRecord calls with Jest

I thought this would be straight-forward, but it turns out to be a complete nightmare. Found no help on google, in the lwc-recipes or documentation. Here's my issue: I have a LWC that makes multiple ...
1
vote
1answer
117 views

Lightning-combobox not showing any value sometimes

I have intermittent problem on my lwc whereby some user not able to see the values when clicking the picklist value (lightning-combobox). When I login using system admin, I also have the same problem ...
0
votes
2answers
150 views

How to pass value to date parameter in apex method from LWC JS?

Please provide a proper way to call this method from LWC passing date parameter. public with sharing class ApexClass { @AuraEnabled(cacheable = true) public Date string apexMethod(Date z) { ...
0
votes
2answers
212 views

Prepopulate values in lightning record form lwc

I’m trying to create one lwc component, where I need to prepopulate some values including lookup in lightning-record-form. Is it possible to do this in lwc?
0
votes
2answers
79 views

how to re-render lightning web component when some fields changed in standard form

I created a lwc component which will use phone number of the contact page. This form is placed in the contact detailed page. If the number is edited in the contact standard form, the value in the ...
2
votes
1answer
50 views

LWC picklist value undefined on initial load

I have a lightning-input-field inside a lightning-record-edit-form, used to create records. The field-name is a picklist field which uses a Picklist Value Set, with one default value. When the form ...
1
vote
2answers
156 views

LWC -ightning/uiObjectInfoAPI - getting INSUFFICIENT_ACCESS error for custom object

I am trying to get metadata info for a custom object using lightning/uiObjectInfoAPI’ here is what I am doing: wire(getObjectInfo, { objectApiName: BATCH_OBJECT }) getBatchObjectInfo({data,error}...
0
votes
1answer
139 views

How to Populate default values in lightning-record-edit-form?

A button resides in a parent object, by clicking which a modal pops up with form to create a new case. Here I am using lightning-record-edit-form for creating a new record. How to pre populate the ...
2
votes
0answers
94 views

Record ID and Target Config Property value are setting to 'undefined' on lwc record page after spring'20 upgrade

I have lwc component built few months ago place on record pages, was working perfectly fine (and still works with winter'20 orgs). But started breaking on spring'20 sandbox and spring'20 scratch-orgs. ...
1
vote
1answer
61 views

LWC - Updating Record with Imported Schema

I'm wondering if I am doing this correctly. I'm trying to use the static schema for referential integrity as recommended here, under Import References to Salesforce Objects and Fields, but it doesn't ...
4
votes
0answers
169 views

LWC @wire order of execution not working for ie11

I have implemented a lightning web component (lwc) that shows a dependent picklist field To load a dependent picklist in lwc I use @wire with getPicklistValues and because getPicklistValues requires ...
9
votes
1answer
440 views

Get Object Label from API Name in LWC using wire

Is there any way to get Object label from API Name? I tried Below, but it gives API Name Only import objectName from '@salesforce/schema/object';
4
votes
2answers
142 views

How to @wire an external Rest API call with LWC OSS?

I have created a basic project and simply want to pull a list of greetings from Google Firestore instead of using the default static array of greetings. My greeting.js file looks like this: import { ...
0
votes
1answer
122 views

LWC Get Contact Name for current User (Community User) using wire and importing reference via relationship

I'm trying to get the First Name of the Contact related to the logged-in user. In this answer have been able to get the contact ID but when I try to import a reference to a field via a relationship ...
2
votes
0answers
64 views

Local LWC - Proxy Issue

Just getting into LWC and local development, so bear with me. Are there local LWC development proxy settings? I have been looking for a bit, but can't find anything. Basically, I'm getting the ...
0
votes
1answer
94 views

Date range query from lwc to Apex

I have this method getFarmData being called from LWC @AuraEnabled(cacheable=true) public static List<RecordWrapper> getFarmData(String listView, Integer Count) { if (...
4
votes
0answers
212 views

lwc getFieldValue from a custom external object

I am creating a LWC that handles data from an external object. I have access to the recordId through @api recordId;, but I need to get the externalId from this object as well. Currently, I have call ...
0
votes
1answer
144 views

Refresh Apex not working on Lightning Record Form Save [duplicate]

I'm not able to understand how refreshApex works in LWC. Here is what i'm trying to achieve: On a web component show - Show most recent 10 records of Account a form (I used a lightning record form ...
0
votes
2answers
45 views

Does the getRecordUi support Location Object?

I have a lwc component, In order to show WorkORder details page I need a relatedField on a relatedObject wich is Location.Name. I have used two methods import LOCATION_NAME_FIELD from "@salesforce/...
1
vote
1answer
545 views

Error: Refresh failed because resolved configuration is not available

I am trying to clear the cache of my wire method. But I have added refreshApex in my code but I am getting error Error: Refresh failed because resolved configuration is not available. My Code ...
6
votes
2answers
1k views

LWC : Events - When to use event.target.value & event.detail.value [closed]

I am looking for the difference between event.target.value and event.detail.value. It was mention that To communicate data to elements in the same shadow tree, use event.target and To communicate ...
2
votes
1answer
104 views

Use wire service/getObjectInfo with External Objects?

I'm am trying to use Salesforce's wire service to return schema information for an external object. js: import { LightningElement, track, wire, api } from 'lwc'; import { CurrentPageReference } from ...
1
vote
0answers
78 views

how to pass field value to track variables in lwc and retrive the track variable in a function

Hello I want to pass the IsConverted value into a variable and retrieve it in a function import { LightningElement,track,api,wire} from 'lwc'; import { getRecord } from 'lightning/uiRecordApi'; ...
1
vote
1answer
384 views

LWC: Can't access field values from @wire + uiRecordApi/getRecord

I'm new to LWC. And after going through the entire "Build Lightning Web Components" trail, I must still be missing something fundamental about how the uiRecordApi getRecord method works, or maybe I ...
0
votes
3answers
379 views

LWC wire function

I want to display some value using button click. I have written a simple js and apex. I don't see any error in console but the data is not displaying. Can anyone tell me what is wrong with my code. ...