2022 Developer Survey is open! Take survey.

New answers tagged

0 votes

How to add an empty line/space in Lightning App Builder?

As per salesforce standard functionality, its not possible to add line/space between two fields in lightning record pages. Refer the Idea
user avatar
0 votes

Open lightning component in new browser tab

Here are two additional Quick Action Button Lightning Component solutions to either open a pop-up window or new browser tab with a Visualforce Page (or whatever URL you want to redirect to): Lightning ...
user avatar
0 votes

Open Lightning component in new tab or window with standard Action button using URL

Here are two Quick Action Button Lightning Component solutions to either open a pop-up window or new browser tab with a Visualforce Page (or whatever URL you want to redirect to): Lightning Component: ...
user avatar
0 votes
Accepted

For lighning:recordEditForm

To create a multi-column layout for your record edit layout, use the Grid utility classes in Lightning Design System. This example creates a two-column layout. Reference <aura:component> <...
user avatar
1 vote

Remove focus from close button on lightning:overlayLibrary modal

Was able to remove the styling by adding this to my component markup: <aura:html tag="style"> .slds-modal__close:focus { color: var(--slds-c-button-brand-text-color, var(--...
user avatar
0 votes
Accepted

Regex for Lightning Input in Aura Component

To check length use below: if(stringToCheck.length < 4 || stringToCheck.length > 12){ //throw error } To not allow small letters a-z use below: const regex = /[a-z]/; if(regex2.test(...
user avatar
  • 741
0 votes

How can I set default sorted direction in lightning datatable?

Use ORDER BY clause in the apex controller from which you are receiving data and populating the data-table --> a) to sort by one column : ORDER BY YOURFIELD1 b) to sort by two/multiple columns : ...
user avatar
0 votes

Price is showing Unavailable in B2B commerce in System admin profile

There is a lot of factors to consider here. I would start investigating with: The user you are using, does it belong to a buyergroup? Does that buyergroup from question #1 has the correct ...
user avatar
  • 161
1 vote

LWC Quick Action Error with Record EDIT Form for Lookup Field after Summer 22 Update

We have an ongoing investigation for this behavior numbered #W-11115198 logged with the concerned salesforce product team. It was reported by several other customers too and is being worked on with ...
user avatar
  • 2,461
4 votes
Accepted

TypeError: Cannot read properties of undefined (reading 'DOB') in for loop

When initializing your for loop to iterate through an array using its length and starting at 0 you need to use < rather than <=. In your code you have: for(let i=0 ; i <= this....
user avatar
  • 2,060
0 votes

How to trigger a click() event on LWC element

Just a heads up, as of 2022 lightning-base-components (lighting-button) is passing the click event to the button. Should just be able to call this.template.querySelector('lightning-button').click(); ...
user avatar
0 votes
Accepted

Email Sender Different In Lightning Vs. Classic

Turns out this is indeed a bug: A bug is now created to remove the Discrepancy in the Form Name for the emails sent from Lightning Experience when the use email address matches with an Org Wide email ...
user avatar
  • 1,930
0 votes
Accepted

LWC NavigationMixin Not working

For NavigationMixin we need to follow this format in the .js: export default class IDS_SendSuveryfooter extends NavigationMixin(LightningElement) { ...... } Follow the documentation for more ...
user avatar
  • 176
0 votes

On button click user should be navigated to the New action of an object

Here's what you can do to solve your issue. Create an Aura component for showing your 2 buttons. On click of Button 1 Add New Vendor Call your child Aura Component. On click of Button 2 View Vendors -...
user avatar
  • 116
0 votes

How to add custom field on the detail section of custom lightning page?

There is a separate Tab named as Fields which has the standard and custom fields of the corresponding object chosen, from where we can drag the required field and paste it in the appropriate place of ...
user avatar
  • 351
0 votes
Accepted

How to display profile avatar and text inside lightning data table

You can create your own Custom Data type for cells of LWC data table, refer this documentation; The lightning-datatable component formats data based on the type you specify for the column. Before you ...
user avatar
  • 17.5k
1 vote

Presenting data in a SF Case externally

Technically, you'd be better off getting one of the authenticated portal licenses, such as Customer Portal licenses. They are pretty reasonably priced for what they offer, and you'd have native ...
user avatar
  • 430k
0 votes

Lightning Email Templates Deployment

You can do it... Checklist: Provide these SOQL in Developer Console... SELECT Id, DeveloperName, CreatedDate FROM EmailTemplate ORDER BY CreatedDate DESC If the EmailTemplate is called as "...
user avatar
1 vote

Created App not showing in Lighting App builder

Your screenshot is of the Lightning App Builder setup page which tells you what it's for at the top The Lightning App Builder provides an easy to use graphical interface for creating custom Lightning ...
user avatar
0 votes

Re-enabling the ability to impersonate External Users via "Log in to Experience as User" button (Spring 21)

This worked for me (this assumes you're logging into the experience from the person account/person contact record). You can also use permission sets to control access to the custom 'Log into ...
user avatar
  • 103
1 vote
Accepted

lightning:workspaceAPI - set tab unsaved changes

You are probably looking for the lightning:unsavedChanges component.
user avatar
  • 5,213
2 votes

how to import moment file in LWC in salesforce

import moment from '@salesforce/resourceUrl/moment'; Only gives you the URL for the resource. You still have to load it via loadScript. import MOMENT_SCRIPT from '@salesforce/resourceUrl/moment'; ...
user avatar
  • 430k
1 vote

Salesforce remove Auto Fill for an <ui:inputText>

You should be able to directly swap in a modern lwc lightning-input component here. The reason for doing this, other than this component is no deprecated, is that you can set autocomplete="off&...
user avatar
1 vote

Remove Line Breaks in OutputField from Lightning component

A Simple Approach Using display:flex <lightning:recordViewForm recordId="{!v.recordId}" objectApiName="{!v.sObjectName}"> <span style="display: flex"&...
user avatar
0 votes

Read value attribute in lightning button in the client js controller

You can try below: <lightning:button variant="brand" label="Charge" **data-value**="{!s.Id}" onclick="{!c.callMyCallback}" /> callMyCallback : function(...
user avatar
2 votes
Accepted

lwc not supported on app page (mobile)

In order to support mobile on record page you just have to add <supportedFormFactor type="Small" /> to the related supportedFormFactors section: <targetConfig targets="...
user avatar
  • 3,325

Top 50 recent answers are included