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
// GitHub repo link: https://github.com/salesforceBen/governorLimitsExercise | |
// Exercise 1 issue: | |
Task taskObject; | |
for (Contact contactObject : [SELECT Id, AccountId, LastName FROM Contact]) | |
{ | |
taskObject = new Task(WhoId = contactObject.Id); | |
insert taskObject; | |
} |
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
// .cmp file: | |
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,force:lightningquickActionWithoutHeader"> | |
<aura:attribute name="RecordTypeId" type="String" access="public"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<lightning:recordEditForm aura:id="recordEditForm" recordId="{!v.RecordId}" recordTypeId="{!v.RecordTypeId}" objectApiName="Account" class="slds-p-top_small"> | |
<span class="slds-hide slds-required" aura:id="required">*</span> | |
<lightning:inputField aura:id="picklist" fieldName="Industry" /> | |
<lightning:inputField fieldName="RecordId" value="{!v.RecordId}" class="slds-hide" /> | |
<lightning:inputField fieldName="RecordTypeId" value="{!v.RecordTypeId}" class="slds-hide" /> | |
</lightning:recordEditForm> |
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
// Create a Visualforce page: | |
<apex:page controller="CSVParser" docType="html-5.0" lightningStylesheets="false" showHeader="false" sidebar="false" standardStylesheets="false"> | |
<head lang="en"> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> | |
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" /> | |
<apex:includeScript value="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.1.0/papaparse.js"/> | |
<!--<apex:includeScript value="{!$Resource.papaparse2}"/>--> | |
<link rel="stylesheet" href="https:maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/> | |
<link rel="stylesheet" href="https:maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/> |
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
// GitHub repo link: https://github.com/salesforceBen/governorLimitsExercise | |
// Exercise 1 issue: | |
Task taskObject; | |
for (Contact contactObject : [SELECT Id, AccountId, LastName FROM Contact]) | |
{ | |
taskObject = new Task(WhoId = contactObject.Id); | |
insert taskObject; | |
} |
NewerOlder