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
/** | |
* This class is a utility class for WebServices and other API classes | |
*/ | |
global with sharing class APIUtils { | |
global final static Integer STATUS_OK = 200; | |
global final static Integer STATUS_CREATED = 201; | |
global final static Integer STATUS_ACCEPTED = 202; | |
global final static Integer STATUS_BAD = 400; | |
global final static Integer STATUS_FORBIDDEN = 403; | |
global final static Integer STATUS_NOTFOUND = 404; |
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 MyObjectTrigger { | |
private final Map<Id, MyObject__c> oldMap; | |
private final Map<Id, MyObject__c> newMap; | |
private final List<MyObject__c> newObjs; | |
private final Boolean isInsert; | |
private final Boolean isUpdate; | |
private final Boolean isDelete; | |
private final Boolean isBulk; | |
/** |
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
" General stuff | |
set nocompatible | |
filetype on | |
set background=light | |
syntax on | |
" don't make it look like there are line breaks where there aren't: | |
set nowrap |
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
MyObject__c obj = MyObjectUtils.myObjectMap.get('Foo'); |
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 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; | |
/** |
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
/** | |
* To schedule the monthly reconciliation: | |
* NOTE: It should run at midnight on the first of every month on it's own, but if you make | |
* changes and need to requeue run the command below from the developer's console | |
* | |
* scheduledMonthly.scheduleIt(); | |
*/ | |
global class scheduledMonthly implements Schedulable { | |
public static String CRON_EXP = '0 0 0 1 * ? *'; |
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 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; | |
/** |
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 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; | |
/** |
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
function swap() { | |
TMP_NAME="TMP_$RANDOM" | |
mv "$1" "/tmp/$TMP_NAME" && mv "$2" "$1" && mv "/tmp/$TMP_NAME" "$2" | |
} |
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
global with sharing class CaseEdit_ControllerExtension { | |
private final Id recordId; | |
private final Case record; | |
private final ApexPages.StandardController controller; | |
public Case_ControllerExtension(ApexPages.StandardController stdController) { | |
this.controller = stdController; | |
this.recordId = this.controller.getId(); | |
this.record = [ | |
select Product__c, |
OlderNewer