This file contains 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 DragAndDropController | |
{ | |
public String bccAddresses {get; set;} | |
public String ccAddresses {get; set;} | |
public String toAddresses {get; set;} | |
public String caseId {get; set;} | |
public String caseIdChosen {get; set;} | |
public String contactIdToEmail {get; set;} | |
public String externalComments {get; set;} | |
public String htmlBody {get; set;} |
This file contains 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
<apex:page standardController=”Case” extensions=”DragAndDropController” > | |
<apex:slds > | |
<apex:form > | |
<apex:actionFunction name=”redirectToDragAndDropEmailAuthor” action=”{!goToEmailDragAndDrop}” /> | |
</apex:form> | |
</apex:slds> | |
<script> | |
document.addEventListener(‘readystatechange’, event => { | |
if (event.target.readyState === “interactive”) { |
This file contains 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
Contact c = new Contact(); | |
c.lastName = 'Andy The Customer'; | |
c.Email = 'andy@theCustomerEmailAddress.com'; | |
insert c; | |
Case theCase = new Case(); | |
insert theCase; | |
EmailMessage theEmailMessage = new EmailMessage(); | |
theEmailMessage.BccAddress = 'compliance@mostexcellentsoftware.com'; |
This file contains 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
// Exercise 2 issue: | |
for (Account accountObject : [SELECT Id, Description FROM Account]) | |
{ | |
Integer countOfEvents = [SELECT COUNT() FROM EVENT WHERE WhatId =: accountObject.Id]; | |
if (countOfEvents > 0) | |
{ | |
accountObject.Description = String.valueOf(countOfEvents); | |
} | |
update accountObject; | |
} |
This file contains 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
// Too many DML's issue: | |
List<Account> accountList = new List<Account>(); | |
Account accountObject; | |
for (Integer i = 0; i < 150; i++) | |
{ | |
accountObject = new Account(); | |
accountObject.Name = 'Test ' + i; | |
accountList.add(accountObject); | |
} | |
insert accountList; |
OlderNewer