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 dailySummary implements Schedulable | |
{ | |
global void execute(SchedulableContext ctx) | |
{ | |
execFn(); | |
} | |
public void execFn(){ | |
//Do stuff |
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*/ | |
@RemoteAction | |
global static void archivePersonalTasksInLastColumn(){ | |
trTaskboardController.setStaticVarsForRemoteActions(); | |
//String lastListName=trController.getLastListName(); | |
List<Project_Task__c> tasksToArchive = [SELECT Archived__c FROM Project_Task__c WHERE List__c = :lastListName AND Project__c = null AND OwnerId=:UserInfo.getUserId()]; | |
for(Project_Task__c task : tasksToArchive){ | |
task.Archived__c = true; | |
} | |
//update tasksToArchive; |
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 wat = { | |
'ar_SA': 'dd/mm/yy', | |
'bg_BG': 'dd.m.yyyy', | |
'ca_ES': 'dd/mm/yyyy', | |
'zh_TW': 'yyyy/m/d', | |
'cs_CZ': 'd.m.yyyy', | |
'da_DK': 'dd-mm-yyyy', | |
'de_DE': 'dd.mm.yyyy', | |
'el_GR': 'd/m/yyyy', | |
'en_US': 'm/d/yyyy', |
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 formats = { | |
'af_ZA': 'yyyy/mm/dd', | |
'am_ET': 'd/m/yyyy', | |
'ar': 'dd/mm/yy', | |
'ar_AE': 'dd/mm/yyyy', | |
'ar_BH': 'dd/mm/yyyy', | |
'ar_DZ': 'dd-mm-yyyy', | |
'ar_EG': 'dd/mm/yyyy', | |
'ar_IQ': 'dd/mm/yyyy', | |
'ar_JO': 'dd/mm/yyyy', |
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
Had to manually map, most are easy, sh -> sr made me look up the label though... after I saw the label I knew I should have recognized it from the country codes: | |
iw | |
iw_IL | |
in | |
in_ID | |
sh_ME | |
no | |
no_NO | |
sh | |
sh_BA |
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
if (!showWarning(this)) return false;bannerText=null;;A4J.AJAX.Submit('j_id0:j_id12',event,{'similarityGroupingId':'j_id0:j_id12:objectTable:213:j_id25','parameters':{'j_id0:j_id12:objectTable:213:j_id25':'j_id0:j_id12:objectTable:213:j_id25'} } ) |
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
<script> | |
document.addEventListener('DOMContentLoaded', pageFullyLoaded, false); | |
function pageFullyLoaded(){ | |
var body = document.body, | |
html = document.documentElement; | |
var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ); | |
alert(height); | |
Sfdc.canvas.publisher.resize( {height : height+'px'}); | |
} | |
</script> |
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
Schema.DescribeSObjectResult d = Schema.getGlobalDescribe().get('Task').getDescribe(); | |
Map<String,sObjectField> fields = d.fields.getMap(); | |
for (String f : fields.keyset() ) { | |
Schema.DescribeFieldResult dfr = fields.get(f).getDescribe(); | |
//system.debug(JSON.serialize(dfr)); | |
system.debug(dfr.Name); | |
} |
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
<!-- include this fella --> | |
<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script> | |
<script> | |
//Call whenever you do something that results in a frame resize, and probably on load | |
function resizeIframe(){ | |
var containerHeight = document.getElementById('checklist-container').clientHeight; | |
Sfdc.canvas.publisher.resize( {height : containerHeight+'px'}); | |
} | |
</script> |
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 boardInfoWrapper toggleFollowTask(string taskId){ | |
//Find if there is a current record | |
//Need to use without sharing | |
List<EntitySubscription> existingList = trControllerWithoutSharing.queryWithoutSharing('Select e.SubscriberId, e.ParentId From EntitySubscription e WHERE e.SubscriberId=\''+String.escapeSingleQuotes(UserInfo.getUserId())+'\' AND e.ParentId=\''+String.escapeSingleQuotes(taskId)+'\' LIMIT 1000'); | |
//If no, insert a new one | |
if(existingList.size()==0){ | |
EntitySubscription follow = new EntitySubscription (parentId = taskId,subscriberid = UserInfo.getUserId()); | |
Map<String, Schema.SObjectField> fields = Schema.SObjectType.EntitySubscription.fields.getMap(); | |
if(fields.get('NetworkId')!=null){ |