Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick Connelly pcon

View GitHub Profile
View Controller.java
public class ManageLeadTerritoryController {
@TestVisible private static String SCHEDULED_JOB_NAME = 'Mass Update Leads';
@RemoteAction
public static void massUpdateNow()
{
List<Territory_Setup__c> LeadTerrSetups = [select Id, Next_Mass_Update_Date_Lead__c, Status__c from Territory_Setup__c
order by lastmodifieddate desc limit 1];
if(LeadTerrSetups.size() > 0 && LeadTerrSetups[0].STatus__c == 'on')
@pcon
pcon / ServiceRequestTrigger.java
Created May 31, 2012
Checking previous status != 'In Review' and then switched to 'In Review' - field expression now allowed for generic SObject line 33
View ServiceRequestTrigger.java
public class ServiceRequestTrigger {
private final Map<Id, Service_Request__c> oldMap;
private final Map<Id, Service_Request__c> newMap;
private final List<Service_Request__c> newObjs;
private final Boolean isInsert;
private final Boolean isUpdate;
private final Boolean isDelete;
private final Boolean isBulk;
/**
@pcon
pcon / ServiceRequestTrigger.java
Created May 30, 2012
Checking previous status != 'In Review' and then switched to 'In Review' - field expression now allowed for generic SObject line 33
View ServiceRequestTrigger.java
public class ServiceRequestTrigger {
private final Map<Id, Service_Request__c> oldMap;
private final Map<Id, Service_Request__c> newMap;
private final List<Service_Request__c> newObjs;
private final Boolean isInsert;
private final Boolean isUpdate;
private final Boolean isDelete;
private final Boolean isBulk;
/**
@pcon
pcon / template.java
Created May 22, 2012
Pcon trigger template.java
View template.java
public class OrderTrigger {
private final Map<Id, Order__c> oldMap;
private final Map<Id, Order__c> newMap;
private final List<Order__c> newObjs;
private final Boolean isInsert;
private final Boolean isUpdate;
private final Boolean isDelete;
private final Boolean isBulk;
/**