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
public with sharing virtual class CalloutUtils { | |
private HttpRequest request; | |
private Http httpInstance; | |
private HttpResponse response; | |
private String method; | |
private String endPoint; | |
private String body; | |
private Integer timeout; |
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 DemoFileUploadCntl { | |
@RemoteAction | |
global static String createContentVersion(String data, String fileName, String parentId) { | |
ContentVersion versionData = new ContentVersion (); | |
versionData.ContentLocation = 's'; | |
versionData.VersionData = EncodingUtil.base64Decode(data); | |
versionData.PathOnClient = fileName; | |
versionData.Title = fileName; | |
insert versionData; | |
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="Lead" showHeader="false" sidebar="false" id="page"> | |
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" /> | |
<style> | |
#spinner{ | |
display: none; | |
width:300px; | |
height: 70px; | |
position: fixed; | |
top: 50%; |
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 progress () { | |
let progressBar = document.getElementById ('progress'); | |
let percentCount = document.getElementById ('percentcount'); | |
let vc_label_units = document.getElementById ('vc_label_units'); | |
let counter = 5; | |
let progress = 25; | |
let id = setInterval (frame, 50); |
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 EmailToLead implements Messaging.InboundEmailHandler { | |
global Messaging.InboundEmailResult handleInboundEmail (Messaging.InboundEmail email, Messaging.InboundEnvelope envelop ) { | |
Messaging.InboundEmailResult res = new Messaging.InboundEmailResult (); | |
Lead leadData = new Lead (); | |
leadData.LastName = 'Email TO lead'; | |
leadData.Company = 'Email2Lead'; | |
leadData.Email = email.fromAddress; | |
leadData.TTSApp__StartDate__c = System.now(); | |
leadData.TTSApp__EndDate__c = System.now().addDays(10); |
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
.THIS span .slds-radio_faux::after { | |
background: #5d9732 !important; | |
} | |
.THIS .slds-radio [type="radio"]:focus + .slds-radio__label .slds-radio_faux { | |
border-color: #5d9732 !important; | |
box-shadow: 0 0 3px #5d9732 !important; | |
} |
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 searchReport(searchInputId, searchTableId) | |
{ | |
var input, filter, table, tr, td, i; | |
input = document.getElementById(searchInputId); | |
filter = input.value.toUpperCase(); | |
table = document.getElementById(searchTableId); | |
tr = table.getElementsByTagName("tr"); | |
// Loop through all table rows, and hide those who don't match the search query | |
for (i = 0; i < tr.length; i++) { |
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
<iframe> | |
<html> | |
<head> | |
<script src='https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit' /> </script> | |
<script type="text/javascript"> | |
var callPostMethod = function (action, response) { | |
var hostURL = window.location.origin; | |
parent.postMessage({ action: action, response : response }, hostURL); | |
} | |
var onVerifyCallback = function () { |
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
public class CaseController { | |
public transient Attachment objAttachment; | |
public String message{get;set;} | |
public String messageType{get;set;} | |
public Boolean fileUploadProcessed{get;set;} | |
public Attachment getObjAttachment () { | |
objAttachment = new Attachment (); | |
return objAttachment; |
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
jQuery(function($){ | |
var lastHeight = 0, curHeight = 0, $frame = $('iframe:eq(0)'); | |
setInterval(function(){ | |
curHeight = $frame.contents().find('body').height(); | |
if ( curHeight != lastHeight ) { | |
$frame.css('height', (lastHeight = curHeight) + 'px' ); | |
} | |
},500); | |
}); |