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 boolean isTrue(boolean myBool){ | |
if(myBool){ | |
return true; | |
}else{ | |
return false; | |
} | |
} | |
public Map<Id,Contact> getContactMap(){ | |
Map<Id,Contact> contactMap = new Map<Id,Contact>(); |
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 boolean isTrue(boolean myBool){ | |
return myBool; | |
} | |
public Map<Id,Contact> getContactMap(){ | |
return new Map<Id,Contact>([Select Id From Contact]); | |
} |
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
List<Account> accList = new List<Account>([Select Id,Name From Account]); | |
for(Account acc : accList){ | |
Integer numWithEmail = 0; | |
for(Contact cont : [Select Id,Email From Contact Where AccountId = :acc.Id]){ | |
if(!String.isEmpty(cont.Email)){ | |
numWithEmail++; | |
} | |
} | |
} |
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
List<Account> accList = new List<Account>( | |
[Select | |
Id | |
,Name | |
,(Select | |
From | |
Contacts | |
) | |
From Account] |
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
List<Account> accList = new List<Account>( | |
[Select | |
Id | |
,Name | |
,(Select | |
From | |
Contacts | |
) | |
From Account] |
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
List<Account> parentAccounts = new List<Account>(); | |
for(Contact contactWithAccountInfo : [Select Name,Account.Name,Account.AnnualRevenue From Contact]){ | |
System.debug('Contact Account Id: ' + contactWithAccountInfo.Account.Id); | |
parentAccounts.add(contactWithAccountInfo.Account); | |
} |
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
<!-- LDS markup for a checkbox (https://www.lightningdesignsystem.com/components/forms/) --> | |
<div class="slds-form-element margintop10"> | |
<label class="slds-checkbox" for="requiredCheckbox"> | |
<ui:inputCheckbox aura:Id="requiredCheckbox" value="{!v.selectedFormObject.Required_On_Form__c}" /> | |
<span class="slds-checkbox--faux" /> | |
<span class="slds-form-element__label marginleft10">Required on Form?</span> | |
</label> | |
</div> |
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
IF( | |
OR( | |
ISBLANK(Available_From__c) | |
,Available_From__c < CASE( | |
MOD(TODAY() - DATE( 1900, 1, 7 ), 7 ), | |
2, TODAY() + 2 + 4, | |
3, TODAY() + 2 + 4, | |
4, TODAY() + 2 + 4, | |
5, TODAY() + 2 + 4, | |
6, TODAY() + 1 + 4, |
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
/** | |
* @description Simple invocable class (can be called via process or flow). For logging a message or messages to the debug logs. | |
* @author James Loghry | |
* @date 8/1/2016 | |
*/ | |
public class InvocableLogger { | |
@InvocableMethod | |
public static void log(List<String> messages){ | |
if(messages != null){ | |
for(String message : messages){ |
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
/** | |
* ContactsCtrl | |
* @description Apex and stuff.. | |
* @author | |
* @date 11/21/2016 | |
*/ | |
public with sharing class ContactsCtrl { | |
@AuraEnabled | |
public static List<Contact> getContacts(){ |