This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global class PagingSortingController { | |
| @AuraEnabled global static Account[] getAccounts() { | |
| return [SELECT Name, Industry, AnnualRevenue FROM Account LIMIT 1000]; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger LeadTrigger on Lead (before insert, after insert, before update, after update, | |
| before delete, after delete, after undelete) { | |
| new LeadTriggerHandler().run(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public virtual class TriggerHandler { | |
| // Current context of the trigger, overridable in tests | |
| @TestVisible | |
| private TriggerContext context; | |
| // Constructor | |
| public TriggerHandler() { | |
| this.setTriggerContext(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LeadTriggerHandler extends TriggerHandler { | |
| List<Lead> newLeads; | |
| public LeadTriggerHandler(){ | |
| newLeads = (List<Lead>) Trigger.new; | |
| } | |
| public override void beforeInsert() { | |
| Set<String> companyNames = new Set<String>(); // Will hold the set of Lead Company Names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FileController { | |
| @AuraEnabled | |
| public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) { | |
| base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); | |
| Attachment a = new Attachment(); | |
| a.parentId = parentId; | |
| a.Body = EncodingUtil.base64Decode(base64Data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="Lookup"> | |
| <aura:attribute Name="selItem" type="object" access="public" | |
| description="This attribute can be used by parent component to read selected record"/> | |
| <aura:attribute Name="server_result" type="object[]" access="private" /> | |
| <aura:attribute name="lookupIcon" type="String" access="public" default="standard:contact"/> | |
| <aura:attribute name="objectName" type="String" access="public" | |
| description="Name of Object to be searched"/> | |
| <aura:attribute name="field_API_text" type="String" access="public" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:event type="COMPONENT"> | |
| <aura:attribute name="param" type="String"/> | |
| </aura:event> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component > | |
| <aura:method name="myMethod" action="{!c.executeMyMethod}"> | |
| <aura:attribute name="param1" type="String"/> | |
| <aura:attribute name="param2" type="String"/> | |
| </aura:method> | |
| </aura:component> |