Skip to content

Instantly share code, notes, and snippets.

View mtetlow's full-sized avatar

Mike "Mikename" Tetlow mtetlow

  • AscendX
  • Denver CO
View GitHub Profile
@mtetlow
mtetlow / how_to_parse_this.java
Last active October 28, 2019 23:32
ConnectApi.SmartDataDiscovery API
ConnectApi.SmartDataDiscoveryPredictInputRecords input = new ConnectApi.SmartDataDiscoveryPredictInputRecords();
input.predictionDefinition = '0ORf0000000xxxxxxx';
input.records = new List<Id>{'a291Y000002Exxxxxxx'};
ConnectApi.SmartDataDiscoveryPrediction request =
ConnectApi.SmartDataDiscovery.predict(input);
// Everything up to here so far so good
System.debug('ConnectApi.SmartDataDiscoveryPrediction');
System.debug(JSON.serializePretty(request));
<apex:page standardController="TASKRAY__Project_Task__c" sidebar="false" showHeader="false">
<apex:slds />
<!-- Need to include chatter so the new button on the AttachedContentNotes related list works -->
<style>
.hidden {
display: none;
}
</style>
<apex:page docType="html-5.0" standardStylesheets="false" showHeader="false" sidebar="false" standardController="Case" applyHtmlTag="false" applyBodyTag="false">
<html>
<body>
<iframe style="width: 100%; height: 300px; border: 0;"
src='/apex/TASKRAY__trChecklistAction?Id={!Case.REPLACE_WITH_YOUR_CUSTOM_FIELD_NAME}' />
</body>
</html>
@mtetlow
mtetlow / gist:3e6869852280f3172e42ad766580b9e8
Created November 13, 2017 15:19
sfdx df17 migration notes
#TODO: Highlight line where cursor
Look at app:
https://sfdxdf17.na73.visual.force.com/apex/myApp?sfdc.tabName=01r1I000000c3dy
Examine app source
https://github.com/mtetlow/sfdxdf17-demo
###
@mtetlow
mtetlow / html markup
Created January 23, 2017 16:57
css progress bar indicator
<div class="progress-bar--container">
<div class="{!(v.projectCompletionPercentage == 0) ? 'progress-bar--bar progress-bar--zerowidthbar' : 'progress-bar--bar'}" style="{!'width: '+v.projectCompletionPercentage+'%'}">
<span class="progress-bar--pct-complete-label">{!v.projectCompletionPercentage+'%'}</span>
</div>
</div>
<aura:application >
<c:simpleRecordEdit />
</aura:application>
@mtetlow
mtetlow / lockerMutationReproTest.cmp
Created October 25, 2016 20:46
Object Mutation with Locker Service enabled
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
<aura:attribute name="lockedObj" type="Object" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<button onclick="{!c.addAtributeViaMutation}">Add Attribute via mutation then simple set</button>
<button onclick="{!c.addAtributeDeepSet}">Add Attribute via deep set</button>
<button onclick="{!c.log}">Log</button>
<div>Existing Attribute: {!v.lockedObj.existingAttribute}</div>
<div>New Attribute via mutation: {!v.lockedObj.newAttribute}</div>
<div>New Attribute via deep set: {!v.lockedObj.newAttributeDeep}</div>
</aura:component>
<aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForAllPageTypes,force:hasRecordId" controller="trTestCtrl" access="global">
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<aura:attribute name="testStr" type="String" default="default value" />
<div>{!v.testStr}</div>
</aura:component>
<apex:page standardController="TASKRAY__Project__c">
<script src="/apex/dsfs__DocuSign_JavaScript" />
<input class="btn" type="button" id="docusignActionLink" value="Send with DocuSign" />
<script>
var recordId = '{!TASKRAY__Project__c.Id}';
var sendToDocuSign = function(){
var url = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+recordId;
var win = window.open(url, '_blank');
win.focus();
}
@mtetlow
mtetlow / OpportunityDependencies.app
Last active July 12, 2018 21:05
Using a TaskRay Lightning Component in Aloha
<aura:application access="GLOBAL" extends="ltng:outApp">
<aura:dependency resource="TASKRAY_LTNG:trProjectStatusBar"/>
</aura:application>