New answers tagged

0 votes
Accepted

How to preserve formatting in long text fields in LWC components

To display the preformatted tags either use <pre> tag.
  • 18k
0 votes
Accepted

Creating Multiple Data Table for list of Records using LWC

You have to put all of the data that you want to be individualized into the data together. From there, you need to use those individual variables to render the tables. const tables = [ { id: '1',...
  • 445k
1 vote

Selected Date Field wont stay on page after clicking out of field

Set showDatePicker = "false" should work. Setting showDatePicker = "true" is defaulting the date format to dd/mm/yyyy format which doesn't conform to HTML5
2 votes
Accepted

How to get mouse position?

You have several problems. PageX and PageY should be pageX and pageY. JavaScript is case-sensitive. Further, we typically put hovers next to an element, not right on the mouse cursor. This causes ...
  • 445k
0 votes

Problem Populating array on Click Event

After modifying the value from the attribute, you need to store it again. var arrayList = component.get('v.listSave') var getSelectUser = component.get("v.userIterated"); getSelectUser ...
  • 445k
2 votes
Accepted

How to convert a country name to country code in apex?

You can a create custom metadata, which would contain the country codes for corresponding Country names. So when you receive a country name, you can query that specific Country in the custom metadata ...
1 vote

LWC Rendering issues on Windows, but not on Mac

Apparently it was the z-index. One of the LWCs had CSS that set the z-index to -1, which rendered fine on Mac, but not on Windows.
0 votes

How can i add lightning:select in recordEditForm's one of input field?

The way I did this was to create a combobox and hide the actual text field that you want to set. Then the combobox changes set the value into a variable. In the submit method you grab the value from ...
  • 1
0 votes

Email composer in Lightning component

This has been introduced in Winter 23 release. See link : Access the Email Composer from Custom Components
1 vote

How to create Multiple Pages using Different Page Layout but using Same URL

You can use a feature called page variation to generate different versions of the same page. This does not change url and you can render different layouts for different audience by assigning ...
1 vote
Accepted

Need to relabel a custom link in Lightning

You can achieve this using standard component Rich Text Box in Lightning App Builder. First drag the standard component Rich Text on the home page. Add the Label Text in the editor and make it ...
  • 13.6k
1 vote
Accepted

Issue with building SPA (Single Page Application) on LWR (Lightning Web Runtime) with LWC base components

I was able to resolve the LWC base components styling issue with LWR SPA. Following things need to add in the SPA project to enable LWC component styling. Refer Use Salesforce Lightning Design System ...
0 votes
Accepted

Is there a Public Link Sharing list?

I had this same question and just found the answer. This blog post by forcepanda really helped - https://forcepanda.wordpress.com/2021/05/04/generating-public-url-for-salesforce-files/ You need to ...
  • 16
0 votes

Custom Style For Lightning Toast

You can use Stylehooks to accomplish the styling of the standard Toast message. You will be able to use the documentation for reference.
0 votes
Accepted

Opening a corresponding record via button

I found out the solution to this. I created a custom action from the object and edited my page layout. Now when I click the button it navigates me to the related quotation record. openQuote.js import {...
  • 31
0 votes

Record is updated successfully with "force:recordData" but in response getting Error status code as 'INSUFFICIENT_ACCESS'

The error which is coming in console.log seems to be some access issue. Below solution might help you. Lightning Data Service applies sharing and FLS rules. Verify that the user has access to the ...
1 vote
Accepted

Pass parameters to lightning page in custom list view button

Parameters must be specified with a Namespace. If you're developing for your own org, use c as the namespace. /lightning/n/New_Contact_Roles?c__opptyId=23223 Also, check out the documentation. state ...
  • 445k
2 votes

Is there any way to disable multi select option in Lightning-dual-list box?

Use max="1" property. Maximum number of options allowed in the selected options listbox. <lightning-dual-listbox max="1" ></lightning-dual-listbox> Resources: ...
  • 1,322
0 votes

Restrict access to record types based on lightning app

I was searching for the same question and found that another user asked a similar question. Please follow the below link https://success.salesforce.com/answers?id=90630000000DNXcAAO&_ga=2.25425915....
0 votes

Record Editing in modal LWC

Method marked as @AuraEnabled(Cacheable = true) cannot have DML (insert, update, upsert, delete). What does mean? Your apex method should look like that: @AuraEnabled public static void saveRecord(...
  • 1,322
1 vote
Accepted

lightning-input type = "date" picker's hover and active states to be darker color for WCAG

Might help someone .. I found 2 ways to solve it based on this blog post - https://hellosnl.blogspot.com/2019/07/lwc-override-css-of-standard-lightning-components.html create a style element, assign ...

Top 50 recent answers are included