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 = "StatusService"> | |
| <aura:attribute name="statuses" type="Status__c[]" /> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
| <aura:iteration items="{!v.statuses}" var="status"> | |
| <li>{!status.CreatedDate + ', ' + status.StatusText__c}</li> | |
| </aura:iteration> | |
| </aura:component> |
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 with sharing class StatusService { | |
| @AuraEnabled | |
| public static List<Status__c> getStatuses() { | |
| return [SELECT Name, StatusText__c, CreatedDate | |
| FROM Status__c ORDER BY CreatedDate DESC LIMIT 10]; } | |
| } |
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
| <apex:page standardController="Opportunity" extensions="CustomApprovalController"> | |
| <h1> | |
| Welcome to the Custom Opportunity Approval Page | |
| </h1> | |
| <p> | |
| By Andrew Day | |
| </p> | |
| <b>OPPORTUNITY DETAILS</b> <br/> |
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 UpdateBudget on Transaction__c (after insert) { | |
| System.debug('trigger triggered'); | |
| for(Transaction__c t : Trigger.New) | |
| { | |
| //grab the related employee | |
| User theUser = [SELECT Id, Name FROM User WHERE Id = :(t.Employee_Id__c)]; | |
| //grab the user's budget |
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
| <apex:page controller="ShoppingCartController"> | |
| <p> | |
| Your User Id: {!userId} | |
| </p> | |
| <p> | |
| Your Username: {!userName} | |
| </p> | |
| <p> |
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 ShoppingCartController { | |
| public List<Material__c> materials { get; set; } | |
| //Current User Details | |
| public Id userId { get; set; } | |
| public String userName { get; set; } | |
| public Decimal allocatedBudget { get; set; } | |
| public Decimal remainingBudget { get; set; } | |
| public Decimal budgetSpent { get; set; } |
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
| <apex:page controller="SmartCreateOpportunityController"> | |
| <style> | |
| #power-title { | |
| font-size:20px; | |
| } | |
| </style> | |
| <img src="/resource/1510245559000/SmartSearchPic"/> | |
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 SmartCreateOpportunityController | |
| { | |
| public List<Account> accounts { get; set; } | |
| public List<Asset> assets { get; set; } | |
| public String accountSearchKeyword { get; set; } | |
| public String selectedAccountName { get; set; } | |
| public String assetSearchKeyword { get; set; } | |
| public Id myId { get; set; } | |
| public Account selectedAccount { get; set; } | |
| public Map<Id,Asset> selectedAssetMap { get; set; } |
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 MailUtil { | |
| public void SendMailTest() { | |
| //1. Reserve Email Capacity so you don't go over limits | |
| Messaging.reserveSingleEmailCapacity(5); | |
| //2. Create new mail object | |
| Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |
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 MailUtil { | |
| public void SendMailTest() { | |
| //1. Reserve Email Capacity so you don't go over limits | |
| Messaging.reserveSingleEmailCapacity(5); | |
| //2. Create new mail object | |
| Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |