Questions tagged [lwc]

For questions about Lightning Web Components (LWC) - the UI framework for the Salesforce platform. When using this tag also include the more generic [salesforce] tag.

503 questions
0
votes
1 answer

How to create two triggers for the same object

I have a data table where if a client selects multiple candidates it will automatically create a Job Application AND a Review record. I made a trigger for the creation of a review record but the problem is there is also another requirement where the…
Cintra
  • 1
0
votes
1 answer

Refresh table LWC

I've been trying to rerender a table when I update an Account record with a lightning-record-form. I tried looking up a solution to this with similar questions I found here but I'm still not able to achieve this. In this case I hardcoded the…
0
votes
1 answer

Change Icon position in lightning-input for search type in LWC

I am using standard lightning-input LWC component for search field in my project. By default it shows the search icon on the left side inside the field. How can I shift this icon to right side? I am using the following code:
Vijay Mangal
  • 81
  • 1
  • 4
0
votes
1 answer

Visual Studio code : Issue loading Extensions

I am using visual studio code to do my LWC change and it takes at lest 5 minutes to load those extensions. Some times it fails outright and would not let me run commends. Is there an option to force run extensions?
0
votes
1 answer

Lightning-input Toggle is not unchecking by default based on For Each loop value in LWC

I have created Lightning-input Toggle inside For Each loop. I am looping it through the Address collection. When Address is Active then I need to check the toggle and if Address is IsActive I need to uncheck the toggle. If I am printing the value…
0
votes
2 answers

Why is my console.log in LWC showing variable data in proxy handler

I'm trying to console.log a variable's value but on the browser console instead of printing the variable (an object in my case), I am getting a Proxy container with format like Proxy {}[[Handler]]: En[[Target]]: Array(0)[[IsRevoked]]: false On…
0
votes
1 answer

Catch exception in LWC thrown from Apex in Salesforce

I have the below code to throw an exception from Apex @AuraEnabled() public static void associateAccount(string userId, string accountSAPNumber) { if(String.isBlank(userId) || string.isBlank(accountSAPNumber)) { throw new…
user1800524
  • 65
  • 1
  • 5
0
votes
2 answers

Please guide me how to call a method in LWC

I have a static method in a class from which I am getting a string which is in the form of link. Now when I am trying to pull the same data in the LWC, I am getting the data as undefined. Can anyone please explain me if I need to perform any…
0
votes
4 answers

How to filter month by string query

I have a SQL like this in my apex code: public static list getRecords() { return [ SELECT Name, Date_of_birth__c FROM FB_Employees__c WHERE CALENDAR_MONTH(Date_of_birth__c) =…
0
votes
0 answers

LWC Specialist Superbadge step 8 boatSearchResults error

enter image description here I have been around this for a few days but couldn't find the actual cause of the error. Earlier I had some issues related to importing the methods in js but even after solving I couldn't proceed further. I have checked…
0
votes
1 answer

LWC combining results of 2 lists from different methods

In my LWC component JS, I have used @wire to query the current values of 2 fields (name and mobile) direct from a record in Salesforce. I am saving these values into a list. I have another method getEmpWrapperList inside connectedCallback() which…
newbiedev
  • 3
  • 3
0
votes
1 answer

Referance a static resource via aura:attribute

I have created a new component and I want to be able to pass an image from a static resource and a custom label via aura:attribute. This is what I tried and it does not work. How can I make the image/text to show?
Fergoso
  • 1,584
  • 3
  • 21
  • 44
0
votes
0 answers

Is there an easy way to access the value in a JSON response without hard coding the first value in vanilla ES6 JavaScript?

I guess I should also note that this is being done inside of a Salesforce LWC component. Let's say your response contains something like.. { "color":"#FF0000", "name":"Spectacular", "label":"Glorious Labels", "sort":"true", "type":"link" } I'm…
Jesse Glover
  • 325
  • 3
  • 14
0
votes
1 answer

LWC - display in one column

I am using in my component but by default, it's displaying a group of buttons in one row. I want to display the grouped buttons in one column. How is this possible? Thanks.
newbiedev
  • 3
  • 3
0
votes
1 answer

salesforce lwc - wire adaptor not able to have declared track variables as arguments

I am trying to pull in picklist values of a field based on record type. The below works - @wire(getPicklistValuesByRecordType, { objectApiName: 'Case', recordTypeId: '0123h000000kv04AAA' }) typePicklistValues({ error, data }) { if (data) { …
Sumchans
  • 3,088
  • 6
  • 32
  • 59