December 2020

Salesforce

How to setTimeout before calling subTab() in Salesforce workspaceAPI?

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

Salesforce

Custom sorting with Up and Down Arrow using LWC in Salesforce

Sample Code: HTML: <template> <div class="slds-box slds-theme--default"> <div class="slds-text-color_inverse slds-text-heading_large" style="padding:0.5rem;background:#16325c"> Accounts </div> <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_striped"> <thead> <tr class="slds-line-height_reset"> <th class="" scope="col"> <a class="slds-th__action slds-text-link_reset" href="javascript:void(0);" role="button" tabindex="0" ....