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.
Questions tagged [lwc]
503 questions
0
votes
1 answer
Image with clickable components
I have an image that displays a parking lot. I want to make parking slots clickable and connect them with records in salesforce using lwc. Leaflet-rastercoords seems a good tool to achieve this but I have difficulty in implementing it in lwc with…

KostasV
- 3
- 1
0
votes
0 answers
Not triggering any event until and unless click in last on line inside monaco editor
I am facing a weird issue. I am setting up method through auto suggestion like:
CONCATENATE(n)|
my cursor shows it within parenthesis after n. like
Now i am start typing again by replacing n with some value which also suppose to start dispalying…

Avnesh Shakya
- 3,828
- 2
- 23
- 31
0
votes
1 answer
What needs to be assigned to a lookup field when using createRecord in salesforce lwc js?
I tried passing opportunity id and name
quotefields[OPPORTUNITY_FIELD.fieldApiName] = ???;
const recordInput1 = { apiName: QUOTE_OBJECT.objectApiName, quotefields };
console.log(recordInput1)
//creating a quote
…

Panikd Kernel
- 3
- 2
0
votes
1 answer
Handle JS Event Values on Change
I have an LWC with a piece that goes something like:
Javascript
handlePCCFieldChange(event) {
if (event.target.name === "checkbox") {
this.Obj.checkbox = event.target.checked;
console.log('checkbox');
}
if…

Nathaniel Manns
- 1
- 2
0
votes
1 answer
Custom Web Components setting properties in connectedCallback
I have posted a similar question on Salesforce stack where the context is Lightning Web Components(which is just an extension of HTML Web Components). I am asking here because I would like to reach a wider audience.
In their documentation they say…

Michael Munta
- 207
- 2
- 16
0
votes
0 answers
Handle Multiple Conditions per Field - LWC Conditional Formatting
I'm new here so hoping the title does well. I have something like this in my LWC -
//HTML

Nathaniel Manns
- 1
- 2
0
votes
1 answer
How to pass value from Lightning Web Component to Flow variable?
Does anyone know the way to pass value from LWC to Flow variable?
When clicking "Add Name" button, I want input value to be passed to Flow valuable. "Manually assign variables (advanced)" is valid on the screen setting. But the variable is null and…

Yichen
- 1
- 1
- 1
0
votes
1 answer
0
votes
1 answer
Create a task on a lightning web component without apex only javascript controller?
My question is on a salesforce topic.
I need to create a new task when a button is clicked in a lightning web component, and i sort of need it to be done only in javascript. Can anybody help me with the function for the button please?

Anca Zabava
- 1
- 1
0
votes
1 answer
Command 'SFDX: Create Project' resulted in an error (command 'sfdx.force.project.create' not found)
While creating a new sfdx project in VS Code I am getting an error saying error resulted in the command.
I have installed all the necessary extension packages in VS code. Both Salesforce CLI and VS code are up to date.I uninstalled both salesforce…

Saksham Bhakkad
- 1
- 2
0
votes
1 answer
Displaying Record Id instead Of Name for Lookup field in Salesforce
I have created a lwc component with to display the output in . There is a custom lookup field in Account to Employee object. In the screen, instead of the employee name, employee id is displayed. Can someone please suggest what could be the issue ?

Krishna_Tamuli
- 1
- 1
0
votes
1 answer
Action not visible in page layout setup
I have created an action to show a lightning component on the contact record:
When I go to the page layout editor I am not able to see the button to add to the page layout.
I tried with global action but that also doesn't seem to be working.
What…

वरुण
- 1,237
- 3
- 18
- 50
0
votes
1 answer
Default a dynamic value in Combobox onload LWC
I am retrieving a set of values from apex through JS, I want to preselect the the first option in the Lightning-combobox (the retrieved values are different for different users). I used @track variable and tried to set the value onLoad using…

Pragadeesh Dharsha V
- 83
- 2
- 8
0
votes
2 answers
Javascript how to check if incoming param is an object
How to check if an incoming param to my function is an proper object in javascript?
code
function abc(object1, data1) {
if(i need to verify here object1 is a proper JSON then only it should proceed) {
//do the operation
}
}

Tarun
- 53
- 5
0
votes
1 answer
Why define lightningMessageFields in Lightning Message Service?
I am wondering something.
In the XML file of a lightning message channel I can specify lightningMessageFields or I can omit this. Either way messages on the channel function correctly whatever you put into them.
Example one with no…

Dane
- 3
- 2