Salesforce Apex

Salesforce

JSON deserializeUntyped using Apex in Salesforce

Sample Code: String strJSON = '{"items":[{"Date Field":"01-01-1999","Prototype Settings":"PS3","Hardware Type":"Type1","Overall Status":"In Progress","Source":"Web"},{"Date Field":"18-05-1999","Prototype Settings":"PS6","Hardware Type":"Type3","Overall Status":"Completed","Source":"Email"}]}'; Map < String, Object > fullMap = ( Map < String, Object > )JSON.deserializeUntyped( strJSON ....

Salesforce

Reusable Related List using LWC in Salesforce

Sample code: HTML: <template> <lightning-card title={titleWithCount} icon-name="standard:record"> <lightning-button label="New" slot="actions" onclick={createNew}></lightning-button> <div slot="footer"> <div if:true={countBool}> <lightning-button label="View All" onclick={navigateToRelatedList}></lightning-button> </div> </div> <div class="slds-m-around_medium"> <div if:true={listRecords}> <template for:each={listRecords} for:item="rec"> <div key={rec.Id} ....

Salesforce

How to iterate over Records returned By Wire Service in LWC?

Sample Code: HTML: <template> <div> <lightning-datatable key-field="Id" data={accountsWithIndustry} columns={columns} hide-checkbox-column="true" show-row-number-column="true"> </lightning-datatable> </div> <div> <lightning-datatable key-field="Id" data={accountsWithoutIndustry} columns={columns} hide-checkbox-column="true" show-row-number-column="true"> </lightning-datatable> </div> </template> JavaScript: import { LightningElement, wire, track } ....