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
curl 'https://na3.salesforce.com/services/data/v29.0/tooling/query/?q=SELECT+isvisibleinselfservice%2C++activitydate%2C++isarchived%2C++type%2C++createdbyid%2C++bmg__dateopened__c%2C++priority%2C++description%2C++callobject%2C++isdeleted%2C++bmg__statusdescription__c%2C++recurrenceinterval%2C++systemmodstamp%2C++reminderdatetime%2C++bmg__statusupdateddate__c%2C++status%2C++bmg__type__c%2C++recurrenceenddateonly%2C++createddate%2C++ownerid%2C++recurrencetype%2C++isrecurrence%2C++whatid%2C++lastmodifiedbyid%2C++recurrencedayofmonth%2C++isclosed%2C++subject%2C++ce4sf20_001__aeguide_name__c%2C++recurrencedayofweekmask%2C++bmg__dateclicked__c%2C++bmg__messageurl__c%2C++lastmodifieddate%2C++id%2C++isreminderset%2C++bmg__isemailopened__c%2C++whoid%2C++recurrencestartdateonly%2C++calldurationinseconds%2C++accountid%2C++bmg__dateunsubscribed__c%2C++bmg__id__c%2C++bmg__clickdetails__c%2C++recurrencetimezonesidkey%2C++calltype%2C++bmg__isemailclicked__c%2C++recurrenceactivityid%2C++calldisposition%2C++bmg__isunsubscribe |
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
@RemoteAction | |
global static Boolean addUserToSession(Id userId, Id sessionId){ | |
if(space=='avail'){ return true; } | |
else{ return false;} | |
} | |
From javascript: | |
var userId = '{!JSENCODE($UserInfo.Id)}'; | |
var sessionId = '{!JSENCODE(controllerHasSessionId)}'; | |
myControllerName.addUserToSession(userId, sessionId,function(result){ |
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
$j('.modal').on('show.bs.modal', function(e) { | |
var modal = $j(this); | |
var modalContent = $j(this).find('.modal-content'); | |
var modalDialog = $j(this).find('.modal-dialog'); | |
//If the modal is too tall, resize it | |
if($j(modalDialog).height()>=$j(window).height()){ | |
$j(modalDialog).height($j(window).height()-20); | |
} | |
//If the modal is too wide, resize it | |
if($j(modalDialog).width()>=$j(window).width()){ |
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
//Usage | |
...stuff | |
allChildren = trController.stripFLSFields('update', allChildren); | |
update allChildren; | |
..morestuff | |
//Method | |
public static List<sObject> stripFLSFields(String operation, List<sObject> newRecords){ | |
List<sObject> returnList = new List<sObject>(); | |
if(newRecords.size()>0){ |
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"> | |
<iframe src="/apex/TASKRAY__trhomepagewidget" seamless="seamless" style="width:100%; min-height:464px;" frameborder="0"></iframe> | |
</apex:page> |
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
@font-face { | |
font-family: 'icomoon'; | |
src: url('fonts/icomoon.eot'); | |
} | |
@font-face { | |
font-family: 'icomoon'; | |
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8ywAAAC8AAAAYGNtYXDgfOaMAAABHAAAAERnYXNwAAAAEAAAAWAAAAAIZ2x5ZlRMFxoAAAFoAAA6WGhlYWQASAk3AAA7wAAAADZoaGVhB8ID+wAAO/gAAAAkaG10eOIADMUAADwcAAAA6GxvY2GdD5AIAAA9BAAAAHZtYXhwAEMBLQAAPXwAAAAgbmFtZUQXtNYAAD2cAAABOXBvc3QAAwAAAAA+2AAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAgPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADAAAAAIAAgAAgAAACDgNOYC//8AAAAg4ADmAP///+EgAho3AAEAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBRABEDrgNuAFMAAAEuASIGBwEOARQWFx4BMjY3AT4BNCYnLgEiBg8BDgEUFhceATI2PwE+ATIWFx4BFAYHAQ4BIiYnLgE0NjcBPgEyFhceARQGDwEeAxc3PgE0JicDrihmamYp/isoKCgoKWZqZigBIBkZGRkZP0I/GbQKCgoKCRcYFwm1BhAQEAYGBgYG/uAWNzk3FhYWFhYB1RY3OTcWFhYWFgQLEQwHAS4pKSkpA24pKSkp/isoZmpmKSgoKCgBIBk/Qj8ZGRkZGbUJFxgXCQoKCgq0BgYGBgYQEBAG/uEWFhYWFjc5NxYB1RYWFhYWNzk3FgQPICIjEi4pZmpmKAA |
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
//Setup -> Customize -> Chatter -> Feed tracking | |
//Enable feed tracking on TaskRay History, TaskRay Project Notification, TaskRay Task Notification, and TaskRay View Project objects | |
List<TASKRAY__trHistory__Feed> historyFeed = [SELECT Id FROM TASKRAY__trHistory__Feed]; | |
delete historyFeed; | |
List<TASKRAY__trTaskNotification__Feed> taskNotificationFeed = [SELECT Id FROM TASKRAY__trTaskNotification__Feed]; | |
delete taskNotificationFeed; | |
List<TASKRAY__trProjectNotification__Feed> projectNotificationFeed = [SELECT Id FROM TASKRAY__trProjectNotification__Feed]; |
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
//Kick off with | |
Database.executeBatch(new batchUpdate(),50); | |
//Class like this | |
global class batchUpdate implements Database.Batchable<sObject> { | |
// This method returns a SOQL query locator containing the records | |
// to be iterated | |
global Database.QueryLocator start(Database.BatchableContext BC){ | |
return Database.getQueryLocator([SELECT Id,Something__c FROM CustomObj__c]); |
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
Pattern tagSafe = Pattern.compile('[a-zA-Z\\s\\d\\-_]'); | |
Matcher tagSafeMatcher = tagSafe.matcher('Pyramid Construction Inc1234_-.'); | |
String[] strArr = new String[]{}; | |
while(tagSafeMatcher.find()){ | |
system.debug(tagSafeMatcher.group(0)); | |
strArr.add(tagSafeMatcher.group(0)); | |
} | |
system.debug(String.join(strArr,'')); |
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
Pattern tagSafe = Pattern.compile('[a-zA-Z\\s\\d\\-_]'); | |
Matcher tagSafeMatcher = tagSafe.matcher('Pyramid Construction Inc1234_-.'); | |
String[] strArr = new String[]{}; | |
while(tagSafeMatcher.find()){ | |
system.debug(tagSafeMatcher.group(0)); | |
strArr.add(tagSafeMatcher.group(0)); | |
} | |
system.debug(String.join(strArr,'')); |