Skip to content

Instantly share code, notes, and snippets.

View srujan21's full-sized avatar

GANGASRUJAN GURUDU srujan21

View GitHub Profile
/**
* BusinessDays Class
* Use this class to operate only on business days
* and easily skip weekends and holidays from your logic
* @author - Manish Choudhari
* */
public class BusinessDays
{
public BusinessHours bHours;
/**
@jsullivanlive
jsullivanlive / EmailLogic.cls
Created February 8, 2016 22:47
Salesforce Email Merge
public class EmailLogic {
public static String renderTemplate(sObject sobj, String template) {
for (String fieldName : fields(sobj.getSObjectType())) {
String key = '{!' + fieldName + '}';
while (template.containsIgnoreCase(key)) {
try {
Integer foundPosition = template.indexOfIgnoreCase(key, 0);
template = template.left(foundPosition) +
String.valueOf(sobj.get(fieldName)) +
@vertexclique
vertexclique / cracking.md
Last active February 22, 2025 13:20
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@sbob-sfdc
sbob-sfdc / custombutton.cls
Created September 2, 2012 23:39
Workshop 201, Tutorial 4, Step 1, Apex
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
var result = sforce.apex.execute("InvoiceUtilities","renumberLineItems",{invoice:"{!Invoice__c.Name}"});
alert(result);
window.location.reload();