Salesforce Lightning Aura Component

Salesforce

openSubtab() for Lightning Experience in Salesforce

Sample Code:Aura Component:<aura:component implements="flexipage:availableForAllPageTypes" access="global" >        <lightning:workspaceAPI aura:id="workspace" />    <lightning:button label="Open Tab with Subtab" onclick="{! c.openTabWithSubtab }" />     </aura:component> JavaScript Controller:({        openTabWithSubtab : function(component, event, helper) {                var ....

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 Radio Group horizontally using Salesforce Lighting Aura component?

Sample Code: Aura Component: <aura:component implements="force:appHostable" > <aura:attribute name="selectedVal1" type="String" default="Not Sure" /> <aura:attribute name="selectedVal2" type="String" default="No" /> <aura:attribute name="options" type="List" default="[{'label': 'Yes', 'value': 'Yes'}, {'label': 'No', 'value': 'No'}, {'label': ....

Salesforce

Popup using Salesforce Lightning Component

The below code will open Contacts tab when the popup is closed. Sample Code: Lightning Component: <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >                 <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">                      <div class="slds-modal__container">                              <!-- Modal/Popup Box Header-->               <header class="slds-modal__header">                   <lightning:buttonIcon iconName="utility:close"                                         onclick="{! c.closeModel }"                                         alternativeText="close"                                         variant="bare-inverse"                                         class="slds-modal__close"/>                   <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Header</h2>   ....

Salesforce

How to close the quick action popup and refresh the page from custom Salesforce Lightning Component?

Use the below methods to close the quick action popup and refresh the page from custom Salesforce Lightning Component. $A.get("e.force:closeQuickAction").fire();$A.get('e.force:refreshView').fire();  Sample code: Lightning Aura Component: Component: <aura:component implements="force:hasRecordId,force:lightningQuickActionWithoutHeader" controller="Sample" >     ....