3 votes

Consistent spacing in Lightning card

Your example demonstrates both lightning cards and HTML p elements grow with their content. If the paragraph has no content, it has no height. Have the paragraph has a class... <p class="...
Felix van Hove's user avatar
2 votes
Accepted

Any workaround for the LWR3008 error (404 status) while accessing a LWC screen flow component in an LWR site?

Looks like the cause of my problem is that instead of directly using the flow component I have an LWC (wrapped-flow) wrapping the lightning-flow to improve the startup behaviour e.g. spinner over a ...
Keith C's user avatar
  • 136k
2 votes
Accepted

How to access elements in a complex object in LWC

records is an array, so you need to specify the index of the array item you want to reference. Instead of this... data.results[0].result.records.fields.Name.value ...try this... data.results[0]....
Matthew Souther's user avatar
2 votes
Accepted

Unable to add the Signature saved as Image in the ContentDocument in the PDF created using VF and Apex

In Salesforce, like most database systems, one transaction can't see the results of another transaction until the transaction has fully committed. When you call a Visualforce page, it runs in a ...
sfdcfox's user avatar
  • 487k
2 votes
Accepted

LWC Object.assign dot notation throwing error - need to use name field in datatable

If Account__c is null, Account__r will be undefined. For a quick fix, just use the safe navigation operator ?.: accountName: row.Account__r?.Name
sfdcfox's user avatar
  • 487k
2 votes
Accepted

How to select the default picklist value for lightning-combobox in lwc?

The default value, if any, will be in data.defaultValue. To avoid possible race conditions, store the value in a property: if(data) { if(!this.comboboxValue) { this.comboboxValue = data....
sfdcfox's user avatar
  • 487k
2 votes

LWC: Table Body Colspan Not Matching Table Header Span When The Table Body is in a Child Component

Tables do not behave well if there are other elements (including custom elements that are LWC components) in the hierarchy that don't look like parts of a table. The solution for this is, I believe, ...
Phil W's user avatar
  • 35.4k
2 votes

Unable to dynamically populate lightning tree grid

First, we're going to create an object that has each record according to its Id, adding a _children array for storing children. let mapping = Object.fromEntries( data.map( row => [ row....
sfdcfox's user avatar
  • 487k
2 votes
Accepted

omnistudio - navigate action buttons for multiple datatable rows

My recommendation is actually going to be to change how you are building it. What I mean is that I would recommend making a parent flexcard and a child flexcard. The child flexcard would be a row of ...
ReidB's user avatar
  • 61
2 votes

LWC pubsub event to multiple other LWC

Tabs are lazy and don't load their content until they are first shown. You could force each tab to show programmatically to force them to load their content. #areTabsRendered = false; async ...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

Unable to set selected value for combobox in table row

Three changes in your code can fix the problem:- First, modify the products array to have more attributes in each item. We have added one more attribute i.e. picklistValue @wire(getProducts) ...
sanket kumar's user avatar
  • 15.2k
1 vote

Modify field value before this.template.querySelector('lightning-record-edit-form').submit();

When overriding the onsubmit behavior, access to the fields object is available through event.details.fields. From there, you can add Name to the object and set whatever value you choose. This allows ...
mvogelgesang's user avatar
1 vote
Accepted

What is the best way to change the font size and style of a lightning-card title?

title is actually a slot, so you can force whatever styles you want directly into it. <lightning-card> <h1 slot="title" style="font-size: 2em;">I am twice as large<...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

Get field value from within a Map

value:data[key] Can be: value:Object.entries(data[key]).map(([field,value])=>({field,value})) This changes the data into an array of field/value objects. You can iterate over this array to show ...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

How do I set the height of a div programmatically in the LWC's HTML file?

You can directly assign the style to the element. <div lwc:ref="container"> this.refs.container.style = `height: ${innerheight}px;`; You can also use style directly, as in: this.refs....
sfdcfox's user avatar
  • 487k
1 vote
Accepted

LWC component throws error during loadScript for static resource - Lightning Web Security: Cannot access fullscreenEnabled

This is a security feature, as outlined in the LWS Distortion Viewer. Basically, to make sure their customers are safe from phishing attacks, salesforce.com has blocked this feature entirely. Note ...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

fetching contact information browser console error in lwc

const dataResult = JSON.stringify(result); You're converting the data into a string, then trying to use that string to access properties that definitely don't exist on a string (e.g. dataResult....
sfdcfox's user avatar
  • 487k
1 vote

How to select an option in a lightning-select in JavaScript

The answer is to use a variable for the value. The key is you need to set it to the new value in the event handler when the value changes. Then, when you set it back to the value you really want, the ...
mhenry1384's user avatar
1 vote

lightning-formatted-number shows "US$" instead of "$" as currency code

It's the expected behavior. lightning-formatted-number component leveages Intl.NumberFormat(locale, options) to format numbers and the currency symbol depends upon locale attribute. Since GBP is the ...
RubenDG's user avatar
  • 8,392
1 vote

Difficulties with using dynamic components introduced in Winter24

Using setAttribute converts the parameter you pass in into a String. In this case, the constructor's source code. Something like the following should work: constructors = []; async connectedCallback() ...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

Is there a simple way to make a separate checkbox label clickable for a label-hidden lightning-input-field?

After some Googling I came across this post HTML Inputs and Labels: A Love Story that says: There are two ways to pair a label and an input. One is by wrapping the input in a label (implicit), and ...
Keith C's user avatar
  • 136k
1 vote
Accepted

how to change the position of the dropdown of Lightning combobox

For lightning-combobox, we can control dropdown alignment using dropdown-alignment attribute as shown below : <lightning-combobox name="progress" label="...
Rohit's user avatar
  • 1,734
1 vote
Accepted

LWC related list only sorts in one direction

You're missing sorted-by. If you don't set both sorted-by and sorted-direction, the table will not know the correct parameters to send to your event handler. <lightning-datatable data={history} ...
sfdcfox's user avatar
  • 487k
1 vote

LWC: Do I have to use a template element with if:true?

lwc:if|elseif={expression} and lwc:else Conditionally render DOM elements in a template. lwc:if, lwc:elseif, and lwc:else supersede the if:true and if:false directives. Use the conditional directives ...
Domanell's user avatar
1 vote

Create Quick Actions with Lightning Web Components

You will have to "disable" and "enable" then 'reload' the XML Redhat Extension finally "switch to prerelease version". Then it will work fine.
Naveen Buddala's user avatar
1 vote

CSS to remove padding from Quick Action lightning component

Jannis Bott's answer affects the entire page. Here's the solution I found. It only affects our lwc component, and only inside Aura Wrapper. Create a div that covers the entire component html page ...
Max Vitko's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible