Questions tagged [lightning-web-components]

This tag is for questions related to JavaScript, CSS, or Markup when used in the Lightning Web Component (LWC) programming model, or for questions of interoperability between LWC and the original Aura-based lightning components.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

SLDS modals: content elements lose focus on scroll

I have a modal with a lightning-combobox in it. When the combobox is in focus, the dropdown is displayed. When the user clicks elsewhere, the dropdown is hidden. So far so good, but if the height of ...
0
votes
0answers
23 views

Empty lines after each line in LWC meta files

After sfdx force:source:retrieve -x manifest/package.xml my meta files (only LWC) have empty empty lines after each line. Before retrieve: <LightningComponentBundle xmlns="http://soap.sforce....
0
votes
1answer
22 views

Are there API available to measure the flexipage loading time?

There is "Lightning Usage App" and there is "pages" tab, we can view the flexipage performance on that app. But is there any API available for developer to access those performance ...
0
votes
0answers
10 views

Examples of lightning-file-upload for Community Guest Users?

I have a public community that allows a guest user to submit a form (LWC) and create a case record. I now want to embed the lightning:fileUpload component inside the form to allow them to attach a ...
0
votes
0answers
23 views

How does Salesforce “external services” manage CORS?

I start by testing calling a REST API from Postman : this works. I then set up a Salesforce "External Service" and call the same service from a Flow : this works. Then I create a LWC ...
0
votes
1answer
26 views

Understanding regex behavior with Lightning Input

I'm new with all the LWC topic. But for now I'm having issues with some regex. To Begin with I have my own LWC created with a few fields some of them are type number such this one: <lightning-input ...
0
votes
1answer
16 views

Hide Standard Page Header

I know this question is duplicate of the following: Hide Standard Page Header in Custom Lightning App page. The problem is that the solution of creating a static resource and using it in the LWC ...
0
votes
1answer
39 views

Call Visualforce Page from LWC with Parameter

I have a requirement to perform a callout from an LWC to get invoices data and then display as a PDF the data returned. So i have an LWC with a lightning data table and on row action it calls an apex ...
0
votes
0answers
9 views

Developing a DocuSign Component within Salesforce

I need some guidance on the best approach for creating a Lightning Component in Salesforce that will pull in a list of envelopes from DocuSign related to a Salesforce Account record. The Account Id is ...
0
votes
1answer
33 views

Nested loop is lwc js

I am facing a strange problem I have the following piece of code : const allUpdatedFieldsIncludingAccount = event.detail.draftValues; var tempUpdatedList = []; ...
0
votes
1answer
27 views

Fetch value using the key in lwc

I have a question regarding iteration in the js file of an lwc component I have a array of the following JSON format [{"key":"0036F00003hXBGAQA4","value":"...
0
votes
0answers
22 views

Winter '21 LWC “script-src” issue with lightning-record-form

We have an LWC component that leverages the lightning-record-form to allow records of a specific custom object to be created or edited. The form uses an object layout to define the fields to edit, and ...
0
votes
0answers
22 views

How to create custom related list quick links in lwc

I am trying to create a custom related list quick link inside a LWC. I have 2 objects A and B. From the apex I am returning the list of B related record but how can I display it like a related list ...
0
votes
1answer
33 views

How to display non-editable lookup in LWC lightning-record-edit

I am building a component using a lightning-record-edit-form, which may either display an existing record for edit, or a new record for create. The component will set the record-id appropriately. ...
0
votes
0answers
21 views

LWC Copy a record multiple times

I have been working on a cloning process where the user selects a number and then uses a row action to copy a records x number of times from my structures__c custom object. I have the process to copy ...
0
votes
0answers
9 views

Rerender files related list on opportunity record page after creating content document link

I use a LWC on an opportunity record page to create a pdf document that is then converted to a base64 string. From this a ContentVersion object is created and a ContentDocumentLink from an imperative ...
0
votes
1answer
30 views

Adapt font to container size

I'm looking for a solution to this problem: I have a lwc that get passed a text and displays it, but when it's too long (being a title I can't truncate it) I'd need to resize it, to make sure the ...
0
votes
0answers
12 views

device specific UI also adjusting based upon screen

I am facing issues while adjustment of a aura component which contains 3 more inner component. Here compoenent 3 is the main component and other are inner. the overall architecture is looks like: but ...
0
votes
1answer
23 views

Lightning web Component send query string to Visualforce Page

When I was redirecting my page like this, then it was working perfectly fine the current Order Id I was getting from the method after clicking the button Pay now button <div slot="footer" ...
0
votes
0answers
37 views

Convert base64 to pdf and display it in LWC

I have an apex that returns a string, and I want this string to decode it and display it as a pdf to a modal in Lightning Web Component. How can I achieve this? How can I display the pdf without ...
1
vote
1answer
44 views

What's the best tool for complex list views?

We have a very large internal database application that the company relies on every day. Because the company is growing so fast, the current database system is not going to be able to handle the ...
0
votes
0answers
13 views

Pass data from a data table component to a record view

I am trying to pass the case Id a user has selected by clicking on the checkbox on a case row from a data table to then render that cases data to a record edit form where the user can then edit the ...
0
votes
0answers
22 views

Adding and removing objects by checking if it already exists

I am using a base component(datatable) of a managed package which has group-by option to display below data. [ { "callSubReason": "SubReason One one", ...
0
votes
0answers
13 views

How to update file linked to a record?

I have a requirement to upsert a file into Salesforce (SFDC) such that when it linked to my_custom_Object__c, if the file already exists and linked to a record, then the file should be updated. We ...
0
votes
0answers
12 views

How to access the translation for the close button title?

On standard visualforce page there is a close button, when we hover it, it displays a tooltip "Close this window", if the user's language is not English, it will display in other languages. ...
0
votes
0answers
29 views

Not able to access the the fields of account object inside “html” using JavaScript property,

I am trying to access fields of account from the property "accountData" inside HTML file. by using the "." operator ie, accountData.Phone however I am getting error "Cannot ...
0
votes
0answers
15 views

Error: Cannot read property 'apply' of undefined throws at https://commission-calculator-dev-ed--cycc.visualforce.com/auraFW/javascript [closed]

enter image description hereSearchUserComponent.html <div class={formElementClass}> <div if:false={isLabelHidden}> <label class="slds-form-element__label&...
0
votes
1answer
18 views

LWC lightning data not deselects row automatically

I am trying to do the client-side pagination using the data table. The pagination works fine, however when i select a row and update the data attribute of lightning datatable with more values than old ...
0
votes
0answers
14 views

Vertical Variant of Lightning-Tabset Causes Screen Run-off

tl;dr - Why is the vertical variant of the lightning-tabset causing screen run-off? Description My child component renders fine while in a subset of a lightning-tabset, but when I change the lightning-...
1
vote
0answers
16 views

Can LWCs be used in Mobile SDK Hybrid Local Apps?

I see that as of v8.2, the Mobile SDK can use LWCs in Hybrid Apps. But looking closer, it looks like they can only be used in Hybrid Remote Apps and note Hybrid Local apps. Our current app is a hybrid ...
0
votes
1answer
28 views

LWC - Cloning Record Multiple Times

I am trying to build a process where the user selects a clone action from a list of records along with a number. When they do that, they are cloning that records x number of times. I am using a ...
1
vote
1answer
22 views

Unable to see a console log in a LWC method which is being called from an Aura component

I have a simple Aura Component that has a LWC component inside it like this: <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" ...
0
votes
0answers
9 views

Is it possible to find out Standard Page Layout mode(View/Edit) from Inline VF page Controller?

I have added inline VF page on Standard Page Layout. What I am looking for is to fetch main record url from inline VF page. I don't want inline VF page url. So lets say if I navigate to record then ...
0
votes
2answers
53 views

Handle null value in lwc

I am fetching contact address in js and setting the address in a variable which I am using in html to print the address. Now suppose if contact mailing state is empty then in html its printing 'null'. ...
-1
votes
0answers
42 views

JS to Salesforce? [closed]

I have a simple problem I am trying to solve with not so simple solution it seems. I am hoping you guys can help me out. I have an HTML + JS form which has First name,last name,email etc and an CSV ...
2
votes
1answer
50 views

LWC Datatable not being rendered?

I am really having a weird issue where I am trying to simply render a couple of records on a LWC table. I am getting all the wired data right and I believe all is setup correct. Don't know what I am ...
0
votes
1answer
40 views

Event not getting fired from a lwc custom lookup component

I have used a custom lightning datatable which has a component displayed as a lookup customLightningDatatable.html import LightningDatatable from 'lightning/datatable'; import lookupTemplate from './...
2
votes
1answer
31 views

lwc jest: when I have an apex callout inside the subscriber method, everything is executed in correct sequence but the result is still not quite well

In order to fully explain what I mean here, I have a proof of concept small component written. Although the loading element is already set to be false according to console.log and in the correct ...
0
votes
0answers
21 views

How to add Chatter to a community page [closed]

I need some ideas to start with. I would like to add a chatter section in my custom community page, the partner user could add a text and click a Publish button to post the message in the related ...
0
votes
0answers
24 views

A global lightning component that's write once, reusable on service cloud, sales cloud and communities

Can one create a lightning component (e.g. a custom search UI) that is omnipresent and can be re-used in several contexts: within the service cloud, sales cloud, communities cloud, visualforce pages? ...
0
votes
0answers
14 views

LWC Component cannot able to display in the flow screen

I'm using flows for the following process. In the flow screen, there are two types of LWC components one fee and another one is custom flow navigation. Here my screen: In the above screen, I uncheck ...
0
votes
1answer
21 views

Unable to get account record type by wired adaptor

I am not able to get account recordtype by using wired adaptor . Below is my code: import { LightningElement,api, wire } from 'lwc'; import { getRecord,getFieldValue } from 'lightning/uiRecordApi'; ...
0
votes
0answers
28 views

How to automatically add custom components of one app to another app, on installation of the former app?

A bit of a background. I've got 2 managed packages. Let's say first app is named as OMI and the second one as LTY. Now OMI depends on LTY. I've first installed the LTY app, and then I've installed ...
0
votes
1answer
23 views

Download PDF to a local drive on click of a button - Lightning

How can we download PDF file to local drive in Lightning instead of storing in SF? On click of a button, PDF should be downloaded. The button click will initiate an API call (REST) and the response ...
0
votes
0answers
31 views

LWC Datatable Picklist Dropdown is hiding below

I have been trying so long to solve this issue. I am extending the LWC native datatable with picklists. The dropdown is hiding below in the bottom and is not properly visible. Please suggest me a way ...
0
votes
0answers
30 views

Rendering a PDF from Lightning Web Component [duplicate]

I am wondering if anyone has a suggestion on the best practice for rendering a pdf from an LWC. I have a visualforce page that does the rendering now, I pass some values from another visualforce page ...
0
votes
1answer
85 views

Best approach to use/port/migrate an open-source React component to LWC

I want to use an existing React Component as a LWC Lightning Web Component in a Salesforce app. It's a complex component with a Github repo full of Subcomponents. Everything is written in Typescript. ...
0
votes
0answers
13 views

fieldApiName on Person Account custom fields returning __c instead of __pc

I am trying to insert a person account in LWC. I have the following: ... import IDENTITY_CARD from '@salesforce/schema/Account.Identity_Card__pc'; ... const fields = {}; fields[IDENTITY_CARD....
0
votes
0answers
20 views

position is not working in LWC

<lightning-card> <div style="position:relative"> <img src={pic1} style="top: 0px; left: 0px;"> <img src={pic2} style="position:absolute;...
0
votes
0answers
19 views

Unable to call Community header JS functions

For Google Analytics I have to add a script with some JS functions for tag commander. I added the script to the header with the "Edit Head Markup" feature in Community. From the Browser ...

1
2 3 4 5
84