466 questions
0
votes
1
answer
4k
views
How to invoke the Flow, On Button Click from LWC(Salesforce)
I have requirement where I have to load flow having different screens, on click of button in LWC.
I found only one blog related to this is :
https://unofficialsf.com/developer-topic-insert-screen-...
0
votes
1
answer
520
views
How to display SVG from code in LWC salesforce
I am calling the API (GET API).
https://upiqr.in/api/qr?name=SantanuSinha&vpa=9096213138@ybl&amount=100
I am calling the API from the LWC
I get the response in the SVG format.
How can I ...
0
votes
1
answer
1k
views
Clear/Delete the values picked off a lightning-checkbox-group
My goal is to clear all the checkbox checks when I move from one lightning-tab to another. I use the lightning-tab onactive={handleTabClick} function to clear all the field inputs when moving from one ...
0
votes
0
answers
454
views
Why can't I move this code out of the event handler for this Salesforce Lightning Web Component?
I have two event handlers, one is fired when the user types a keystroke that I capture with the onkeyup event and the other is fired when they check or uncheck a checkbox which I capture with a ...
1
vote
1
answer
45
views
not working as expected events via HTML can't be called in script
HTML:
<body>
<script type="module" src="./script.js"></script>
<div>Welcome to my first html page...</div>
<div id="username">...
1
vote
1
answer
3k
views
LWC Layout items not getting aligned
I need advise; from LWC Customer community form is getting displayed.
The problem in facing is when I add new button, the form is not getting aligned in the centre.
The code is:
<template>
<...
0
votes
1
answer
1k
views
Lightning Web Component setting dynamic style not working as expected
I'm currently trying to render a specific class across two lightning-badge components that is suppose to change both badges from inverse to success, but am getting this instead:
When the value on the ...
0
votes
1
answer
1k
views
Hide Header row in LWC Tree_Grid Base component
I wanted to implement Lightning TreeGrid LWC component with no header row.
Tried Updating the CSS in inspect element
I was able to hide the header by modifying the Thead css as shown in the image from ...
0
votes
6
answers
12k
views
Error Deploying or Retrieving source: The file or directory isn't in sfdx-project.json
All of a sudden I started getting this error everytime I'm trying to deploy or retrieve a file directly (right click on apex file and retrieve). This always worked and now it doesn't for all of my ...
1
vote
1
answer
14k
views
After selecting an option from lightning-combobox the dropdown show "Select Progress" instead of the option I picked
When I pick a value from the dropdown (Combobox) instead of keeping the value I picked the dropdown shows "Select Progress" instead.
How can I make the code show the value I picked...???
I ...
0
votes
0
answers
2k
views
How do I check and uncheck for list of checkboxes coming from JSON data in LWC
Hi there I'm working on a functionality for checkbox selection limited for 4 checkbox in the list , so now I have filter hue-rotate in styling for 4 selected checkbox , now if I uncheck the anyone of ...
2
votes
1
answer
2k
views
Custom edit template for custom type Lightning datatable not rendering value in combobox
I have extended the lightning-datatable in order to implement a working picklist editable datatable. I have created the template and the editTemplate as you can see below. The value is working fine in ...
0
votes
1
answer
703
views
Salesforce LWC Editor chrome extension error
chrome showing error "This extension violates the Chrome Web Store policy" for Salesforce LWC Editor.
should I delte it? and what is the alternative?
0
votes
2
answers
5k
views
Salesforce LWC Trying to get the recordId from a lightning-datatable row(s), using the example from the docs & Apex method data returns blank object
The lightning-datatable is showing related info to the contact record.
I get the field that changed, with the new data, and the row id, but not the record Id.
Debug logs show I get back a blank Object ...
1
vote
4
answers
3k
views
How to preview a file in a pop up window in the community page LWC Salesforce
I'm stuck to that issues and don't know how to fix that, so As I know standard library such as 'NavigationMixin' for file preview won't correctly work in the community page, so that code won't work
...
1
vote
1
answer
3k
views
How to save updated an embedded picklist selection on a custom Lightning Datatable?
I am using a 'Custom Datatable' solution in order to modify picklist values within a datatable. Project code may be referenced here:
https://live.playg.app/play/picklist-in-lightning-datatable
I have ...
1
vote
1
answer
574
views
Can I replace the functionality of Platform Event in LWC?
I have a lwc that works with Event Platforms, but event limits are exceeded and I can't reduce them. Is there any functionality or method that can refresh my component in real time without platform ...
-1
votes
1
answer
7k
views
vsCode can't retrieve/deploy anything
Working with Salesforce, org is authorised, everything works fine until it doesn't and there's no error code or anything.
In the morning I retrieved a few files I had to change, 10 minutes later when ...
-1
votes
1
answer
16k
views
How to display Map's list value based on 1 key in Apex Salesforce?
Hello beautiful people,
I have a scenario where I am defining a Map with string key and a list. Now, I want to put values in a list one by one and also display them using the single Key. Example code -...
0
votes
1
answer
681
views
Handling click/hover events with d3.js in Analytics Dashboard LWC
I am currently trying to build an Analytics Dashboard LWC using the d3 library. I want to be able to listen for certain events on the SVG element, however no matter what I try it seems like that event ...
0
votes
1
answer
1k
views
How to show red flag icon in Salesforce LWC using SLDS?
I am writing a lightning html code to display red flag using the SLDS. However, I only see grey flag. Can you help me to get the red variant of the icon? Thank you!
<lightning-icon icon-name="...
0
votes
0
answers
2k
views
How to create Custom Lookup field in lightning-input which fetch the user name?
I want to create custom lookup field without using lightning-edit-record-form.
Notify to when completed = lookup(users),
its not fetching the users name. Here is what I coded:
<lightning-input
...
3
votes
1
answer
17k
views
How to import LWC component from ORG to VSCODE?
I am having some difficulties importing LWC components from org to VSCODE. Is it the right way? Here's what I am following -
Created a new Manifest project.
Connected to my sandbox org (not scratch).
...
0
votes
1
answer
3k
views
How to insert image into lightning-input-rich-text programmatically?
I have an image in base64 format and I want to push the image data explicitly into my lightning-input-rich-text. Is there any way?
My code looks like this:
<lightning-input-rich-text value={body} ...
0
votes
1
answer
4k
views
How to get session id in static method while making callout
I am working on something which includes LWC with tooling API. I wrote this below method which makes a callout. but when I call this method this method from lwc at that time I'm unable to get session ...
0
votes
1
answer
5k
views
lightning-radio-group in LWC
I am trying to build the quiz app in LWC. this is the array in the controller file.
User should get the question and select one answer via radio button.
quizList = [
{
id: "...
1
vote
1
answer
1k
views
UiRecordApi creating two Record at a time
I'm using uiRecordApi to create record with a specific recordType, but it's making two record instead of one.
One with RecordType I'm giving and one with the default RecordType, which is set default ...
2
votes
1
answer
3k
views
Calling Apex method with multiple signatures from LWC
I've noticed some interesting behavior in an LWC that I am building and haven't been able to find much info on the cause. Basically I have an Apex method declared with multiple signatures:
// myMethod ...
1
vote
0
answers
2k
views
How to expose lightning-primitive elements for embedding into LWC HTML files of Salesforce Platform
I am customising LWC <lightning-datatable/> for a version for my company. I have been successful importing and extending LightningDatatable in a local app generated by create-lwc-app.
ie.
import ...
0
votes
2
answers
4k
views
NoErrorObjectAvailable for a lwc
HTML
<template>
<lightning-card>
<lightning-record-form object-api-name={objectApiName}
onsuccess = {handleSuccess}
fields={CONTACT_FIELDS}>
...
-1
votes
1
answer
663
views
How to create popup in lightning web component
Page which will display New Milestone popup in the org, there should be one button for Add new milestone. On click of this button, popup will ask for milestone details and after click on save button ...
1
vote
0
answers
962
views
Salesforce LWC - Breadcrumbs
I am trying to create a breadcrumb using lwc component to display it on my community pages. I don't find a way to get the names of the pages dynamically. I need to use the same breadcrumb component in ...
1
vote
2
answers
7k
views
Dynamically Adjusting Lightning-Input-Rich-Text's textarea
Im trying to increase the height of the textarea box after a user creates several line breaks within the textarea. I'm having issues finding a way to target the value of the textarea height in order ...
0
votes
0
answers
164
views
VSCode imported method comment not displayed in intellisense
I have a method in utils file that is commented like this, the body is not important.
/**
* Calculates width of the column.
*
* @param {string} text text.
* @param {boolean} hasTooltip does title ...
0
votes
0
answers
166
views
update the state slice in redux lwc from the action payload
below is my code to update the state.customer slice. However when this runs, I see that the next state is not updated with the payload dispatched from the action. can some one please point out what I'...
1
vote
1
answer
4k
views
Remove "or Drop files" section/part from file upload button in Lightning web component
Hi is there any way of removing this "or drop files" part from the lightning file upload button ?
In the below screen shot i want to remove the "or drop file" section and only keep ...
0
votes
0
answers
2k
views
Dynamic Field in Lightning web component salesforce
We need to create a lightning web component where we would input the following fields of the Case Object (These fields would be dynamic. Can be changed without changing any code. Make all fields ...
1
vote
1
answer
2k
views
Finding or creating the url for a new Lightning Web Component/ Sales Force
I am new to Sales Force and I want a newly created Lightning Web Component to be accessible by url to outside clients. I'm adding to an existing SalesForce instance.
We have several existing lwc in ...
0
votes
1
answer
9k
views
LWC: What's wrong with the Wire Return code?
Problem is with this line in JS code inside result function-
return this.wirestoredrecords.data.LastName;
I am trying to get the Contact Fields Values using Getter and display in the HTML. PLS HELP.
**...
0
votes
1
answer
455
views
how to use reducerrors method to handle errors in lightning web component?
Can Anyone explain please why did we write ": [ ] " in line 10. I believe it is the simplest way to write but what exactly is this, can anyone give another example of this to understand ...
0
votes
2
answers
4k
views
How to get Parent id on Related list in salesforce
How to get parent id on custom button click of the related list.
Question Exploration:- when we open the Account detail record page and go in the related tab we have a contact list there and a new ...
0
votes
1
answer
1k
views
How to filter JS array containing apex list as a result of SOQL?
I have an apex list which returns a result of SOQL.
List<Account> List1=[select Name, Phone from Account where Name=:actName];
This method is being called from a JS file of my Lightning Web ...
2
votes
1
answer
3k
views
How to properly unload and kill a web component?
im having a simple web component running on my page. By a button click i simply remove the element expecting that the element and the class behind it is getting killed. But actually it keeps running, ...
1
vote
2
answers
4k
views
Add a row from one table to another in LWC
I am very new to LWC and Javascript. I have an LWC component with a search bar and a table (created in HTML file) showing the search result. I want to add another column in the table with a button on ...
3
votes
2
answers
556
views
How to document LWC Salesforce components public variables with JSDoc?
JSDoc skips my public LWC variables.
Here is an example:
/**
* SomePublicVarName mode - default is false.
*
* @type {boolean}
*/
@api
somePublicVarName = false;
If I ...
1
vote
0
answers
1k
views
refreshApex not trigger when called from parent lwc
I have a button on the parent lwc. When called, it will call a method on the child lwc to perform data update via apex method. Once done, it calls refreshApex to refresh the data on the lightning ...
2
votes
2
answers
865
views
Regex for Alphanumeric Values and not two consecutive underscores underscore
I have a requirement in javascript to write a regex for the following condition
The Custom Metadata Record MasterLabel field can only contain underscores and alphanumeric characters. It must be unique,...
1
vote
0
answers
355
views
Salesforce LWC interact with SVG with script
I am trying to display a SVG that contains a script inside a LWC and have some interaction with it.
This SVG is an exploded views of my product. My LWC will contains this SVG and a list of product. ...
0
votes
1
answer
3k
views
How can I make a lightning-input-field (LWC) not required?
I am using a lightning-record-edit-form as shown below
<lightning-record-edit-form object-api-name="Client_Intake__c">
<lightning-input-field name="Id" field-name=&...
2
votes
1
answer
2k
views
Animate DOM Element on removal of Element using LWC
I have to animate the Toast Notifications, I am currently using the transition to show it coming from the top. It looks good to me, I want to stop the sudden moving of the other toast notifications so ...