Posts
Salesforce Interview Quetions
- Get link
- X
- Other Apps
1) What are design patterns in salesforce ? Design patterns are predefined steps or rules that help solve common problems in a structured way. They improve code maintainability and scalability code. There are various types of design patterns, such as creational, behavioral, and structural patterns. While you don't need to know them all, familiarizing yourself with popular ones like. 1) Singleton Design pattern 2) Factory Pattern 3) Abstract Factory 4) Command Pattern 5) Decorator 6) Trigger/Handler patterns can...
Lightning Web Component Examples Search and Table
- Get link
- X
- Other Apps
Apex Class : Public Class getAccountRecords { @AuraEnabled(cacheable=true) public static List<Account> searchAccounts(String searchKey) { String searchTerm = '%' + searchKey + '%'; return [ SELECT Id, Name,Industry,Phone FROM Account WHERE Name LIKE :searchTerm LIMIT 10]; } } searchAccounts.html <template> <lightning-card title="Wired Account Search"> <div class="slds-p-around_medium"> <lightning-input type="text" label="Search Accounts by Name" placeholder="Enter name" onchange={handleSearchKeyChange}> </lightning-input> <template if:true={accounts}> <lightning-datatable key-field="Id" data={account...