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
//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
$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
@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
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
function attachKanbanScrollModifier(){ | |
$j('.kanban-column').on('scroll',function(){lazyScroll(this);}); | |
} | |
var lazyScroll = _.debounce(function(column){columnScrolled(column)}, 150); | |
function columnScrolled(column){ | |
var $column = $j(column); | |
var $columnChildren = $column.children('.task'); |
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 basatitest on Project_Task__c (after insert, after update) { | |
for(Project_Task__c task: Trigger.new){ | |
if((task.List__c == 'Finished') && (Trigger.IsInsert || (Trigger.Isupdate && (Trigger.OldMap.get(task.id).List__c <> 'Finished')))){ | |
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |
String[] toAddresses = new String[] {'[email protected]'}; | |
mail.setToAddresses(toAddresses); | |
mail.setReplyTo('[email protected]'); | |
mail.setSenderDisplayName('basati test'); | |
mail.setSubject('basati test'); | |
mail.setCharset('UTF-8'); |
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 taskAfterUpdateAndInsert on TASKRAY__Project_Task__c (after insert, after update) { | |
for(TASKRAY__Project_Task__c task: Trigger.new){ | |
if((task.TASKRAY__List__c == 'Finished') && (Trigger.IsInsert || (Trigger.Isupdate && (Trigger.OLdmap.get(task.id).TASKRAY__List__c <> 'Finished'))) ){ | |
Datetime dt = Datetime.now(); | |
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |
String[] toAddresses = new String[] {'[email protected]'}; | |
mail.setToAddresses(toAddresses); | |
mail.setReplyTo('[email protected]'); | |
mail.setSenderDisplayName('basati test'); |
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 docType="html-5.0" standardStylesheets="false" showHeader="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false"> | |
<html> | |
<head> | |
<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script> | |
<script type='text/javascript'> | |
Sfdc.canvas.publisher.subscribe({ | |
name: "publisher.showPanel", | |
onData:function(e) { | |
console.log('test1'); | |
console.log(e); |
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
//HTML | |
var customLabels=JSON.parse('{!JSENCODE(customLabelJSON)}'); | |
//Apex | |
public static String customLabelJSON{ get; set; } | |
... | |
Map<String,String> labelValueMap = new Map<String,String>(); | |
labelValueMap.put('blmd_SideBarHeader_FollowUpProcessing',System.Label.blmd_SideBarHeader_FollowUpProcessing); | |
customLabelJSON=JSON.serialize(labelValueMap); |