May 2020

Salesforce

How to make radio button in front of label using Aura components in Salesforce?

Sample Code:Component:<aura:component implements="force:appHostable,forceCommunity:availableForAllPageTypes">        <aura:attribute name="options" type="List" default="[                                                        { 'value': 'option1', 'label': 'Sales' },                                                        { 'value': 'option2', 'label': 'Force' }                                                        ]"/>    <aura:attribute name="value" type="String" default="option1"/>        <div class="slds-box slds-theme--default">               ....

Salesforce

Navigating to a Page in Lightning Community using Custom Lightning Component and pass list values

Create a Standard Page with the name "Sample": Sample code: Component1 cmp: <aura:component implements="forceCommunity:availableForAllPageTypes" access="global" > <aura:attribute name="Txt1" type="String" default=""/> <aura:attribute name="Txt2" type="String" default=""/> <div class="slds-box slds-theme_default"> This is component ....

Salesforce

How to display set decimals for a number field in lightining:dataTable in Salesforce?

Sample Code: Component:<aura:component implements="force:appHostable"                    controller="AccountListController">                <aura:attribute type="Account[]" name="acctList"/>        <aura:attribute name="mycolumns" type="List"/>                <aura:handler name="init" value="{!this}" action="{!c.fetchAccounts}"/>                <lightning:datatable data="{! v.acctList }"                              columns="{! v.mycolumns ....

Salesforce

for:each in LWC HTML in Salesforce

Sample code: HTML: <template> <div class="slds-box slds-theme_default"> <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_col-bordered"> <thead> <tr> <th class="" scope="col"> <div class="slds-truncate" title="Account Name">Name</div> </th> <th class="" scope="col"> <div class="slds-truncate" title="Account Industry">Industry</div> </th> ....