Posts

Showing posts from May, 2023
  How to split values from multiple picklist to dropdown value in salesforce LWC | Split and display multiple picklist value into single dropdown value in LWC | Create Lightning Web Component HTML Step 1 :-  Create Lightning Web Component : splitMultipicklistLwc.html SFDX:Lightning Web Component >> New >> splitMultipicklistLwc.html <template>     <lightning-card title="Split and display multiple picklist value in lwc ">         <table border="0" cellspacing="0" cellpadding="0" class="slds-table slds-table_bordered slds-table_col-bordered" style="border-collapse:collapse;">             <tr for:each={oppItemArr} for:item='recItem' key={rowId} for:index='index' >                                <td>                     <div class="slds-form-element_controller">                         <select style="margin-top: 15px;" class="slds-select&quo
Image
  How to get the RecordType/Id Name of Account Object based on AccountId and Assign the Record Type Name to Lightning Component : Here are the steps on how to get the RecordType/Id Name of Account Object based on AccountId and Assign the Record Type Name to Lightning Component: Create a Lightning Component. In the component controller, add the following code: public with sharing class MyComponentController { Code snippet @AuraEnabled public static String getRecordTypeName(Id accountId) { SObject record = [SELECT Id, RecordTypeId, RecordType.Name FROM Account WHERE Id = :accountId]; return record.RecordTypeId == null ? null : record.RecordType.Name; } content_copy } In the component markup, add the following code: Code snippet <aura:attribute name="accountId" type="Id" /> <aura:attribute name="recordTypeName" type="String" /> <aura:handler name="init" value="{!this}" action="{!c.init}" /> &