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
| #!/bin/bash | |
| echo $BASH_SOURCE $@ >> ~/Desktop/WRAPPED-LOG.txt | |
| $BASH_SOURCE-wrapped $@ |
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
| final Map <Id, Id> identicalMapIdA = new Map<Id, Id>{'001E000000etpxTIAQ' => '001E000000etpxSIAQ'}; | |
| final Map <Id, Id> identicalMapIdB = new Map<Id, Id>{'001E000000etpxTIAQ' => '001E000000etpxSIAQ'}; | |
| final Map<String, String> identicalMapStringA = new Map<String, String>{}; | |
| final Map<String, String> identicalMapStringB = new Map<String, String>{}; | |
| for (Id keyId : identicalMapIdA.keySet()) identicalMapStringA.put(keyId, identicalMapIdA.get(keyId)); | |
| for (Id keyId : identicalMapIdB.keySet()) identicalMapStringB.put(keyId, identicalMapIdB.get(keyId)); | |
| // Workaround is to put Map<Id, Id> into Map<String, String> | |
| System.assertEquals(identicalMapStringA, identicalMapStringB); |
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
| var HasSession; | |
| function hasSession(onTrue, onFalse) { | |
| var script = document.createElement('script'); | |
| script.src = 'https://na1.salesforce.com/apex/HasSession'; | |
| script.onload = function() { | |
| document.head.removeChild(script); | |
| if (HasSession) | |
| onTrue(); | |
| else |
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
| Ext.define('Force.proxy.RemoteAction', { | |
| extend: 'Ext.data.proxy.Direct', | |
| alias: 'proxy.remoteaction', | |
| requires: ['Ext.direct.RemotingMethod'], | |
| updateDirectFn: function(directFn) { | |
| directFn.directCfg.method.getArgs = Ext.create('Ext.direct.RemotingMethod').getArgs; | |
| directFn.directCfg.method.getLen = function() {return this.len;}; | |
| directFn.directCfg.method.getOrdered = function() {return true;}; | |
| }, | |
| createRequestCallback: function(request, operation, callback, scope) { |
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
| // Per Rich Unger should be fixed in Week of June 11th Patch - https://twitter.com/rich_unger/status/210844950722641920 | |
| System.assert(Type.forName('List<' + Account.SObjectType.getDescribe().getName() + '>').newInstance() instanceOf Account[]); | |
| // Workaround (slightly less efficient) | |
| static Map<String, SObject[]> listInstancesBySObjectNames = new Map<String, SObject[]>{}; | |
| static SObject[] newListInstance(SObjectType sObjectType) { | |
| if (!listInstancesBySObjectNames.containsKey(sObjectType.getDescribe().getName())) | |
| listInstancesBySObjectNames.put(sObjectType.getDescribe().getName(), | |
| Database.query('SELECT Id FROM ' + sObjectType.getDescribe().getName() + ' WHERE Id = null')); |
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
| @isTest class SeeAllDataCustomSettingTests { | |
| @isTest (SeeAllData=true) static void trueSeeAllDataCustomSettingTest() { | |
| final SeeAllDataCustomSetting__c seeAllDataCustomSetting = new SeeAllDataCustomSetting__c(Name = 'Name'); | |
| System.assertEquals(0, [SELECT COUNT() FROM SeeAllDataCustomSetting__c]); | |
| System.assertEquals(0, SeeAllDataCustomSetting__c.getAll().size()); | |
| insert seeAllDataCustomSetting; | |
| System.assertEquals(1, [SELECT COUNT() FROM SeeAllDataCustomSetting__c]); | |
| System.assertEquals(1, SeeAllDataCustomSetting__c.getAll().size()); | |
| delete seeAllDataCustomSetting; |
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 class BatchJob implements Database.Batchable<Account> { | |
| global Account[] start(Database.BatchableContext batchableContext) {return new Account[]{};} | |
| global void execute(Database.BatchableContext batchableContext, Account[] accounts) {} | |
| global void finish(Database.BatchableContext batchableContext) {} | |
| } |
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 class SystemAbortJobMixedDmlBug implements Schedulable { | |
| global void execute(SchedulableContext schedulableContext) {} | |
| } |