This file contains 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
<project name="gradle-ant" default="" basedir="."> | |
<!-- | |
Inspired by Ray Myers | |
https://gist.github.com/raymyers/735788 | |
--> | |
<property environment="env" /> | |
<condition property="gradle.home.executable" value="${env.GRADLE_HOME}/bin/gradle.bat" else="${env.GRADLE_HOME}/bin/gradle"> |
This file contains 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 class ChatterUtils { | |
// makes a simple chatter text post to the specified user from the running user | |
public static void simpleTextPost(Id userId, String postText) { | |
ConnectApi.FeedType feedType = ConnectApi.FeedType.UserProfile; | |
ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput(); | |
messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>(); | |
This file contains 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
<!-- | |
Simple proof-of-concept to create a .ics calendar event with visualforce. | |
Inspired by Natalie Regier @gnatrae | |
This example uses url parameters to set the details of event. | |
You could create a custom button that invokes this page, like: | |
https://<your-salesforce-domain>/apex/vCalendarPage?start={!TEXT(Obj.StartDate__c)}&end={!TEXT(Obj.EndDate__c)}&subject=Event from Visualforce&description=This .ics event created with visualforce&location=The Cloud | |
An example with literal values you can copy & paste in your browser: | |
https://<your-salesforce-domain>/apex/vCalendarPage?start=20140524T140000&end=20140524T153000&subject=Event from Visualforce&description=This .ics event created with visualforce&location=The Cloud |
This file contains 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
<?xml version="1.0"?> | |
<project name="Demo" default="version" basedir="."> | |
<macrodef name="git"> | |
<attribute name="command" /> | |
<attribute name="dir" default="" /> | |
<element name="args" optional="true" /> | |
<sequential> | |
<echo message="git @{command}" /> | |
<exec executable="git" dir="@{dir}"> |
This file contains 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:component controller="ApprovalRequestCommentsController" access="global"> | |
<apex:attribute name="relatedToId" assignTo="{!targetObjectId}" type="String" description="ID of the record whose last approval comments to retrieve"/> | |
<apex:outputText value="{!comments}"/> | |
</apex:component> |
This file contains 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
/** | |
* Written by Doug Ayers, https://communities.bmc.com/people/douglas.ayers%40fotlinc.com | |
* Inspired by Paul Donders, https://communities.bmc.com/people/[email protected] | |
* BMC Communities, https://communities.bmc.com/ideas/3039 | |
*/ | |
trigger BMCRF_IncidentTrigger on BMCServiceDesk__Incident__c ( before update ) { | |
if ( Trigger.isBefore && Trigger.isUpdate ) { | |
BMCRF_IncidentTriggerHelper.checkAndSetImpact( Trigger.new ); | |
BMCRF_IncidentTriggerHelper.checkAndSetUrgency( Trigger.new ); |
This file contains 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 QueueMembersController { | |
// selected queue whose members to view | |
public ID queueId { get; set; } | |
// provide queue name to show on page | |
public Group selectedQueue { | |
get { | |
return [ | |
SELECT |
This file contains 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
# | |
# Specify System Administrator credentials | |
# that will login to Salesforce to retrieve the metadata. | |
# | |
# You will also need the security token. | |
# | |
# The server url is which instance to connect to: | |
# For sandboxes, use https://test.salesforce.com | |
# For production or developer orgs, use https://login.salesforce.com | |
# |
This file contains 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
<messaging:emailTemplate subject="Close Opportunity" | |
recipientType="User" | |
relatedToType="Opportunity"> | |
<messaging:htmlEmailBody > | |
<html> | |
<body> | |
Opportunity: <a href="https://test.salesforce.com/{!relatedTo.id}"><apex:outputText value="{!relatedTo.name}"/></a> | |
<br/> |
This file contains 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
// hide sidebar component that embedded this javascript | |
$("h2:contains('Google Analytics')").parent().parent().hide(); | |
// Google Universal Analytics (provided by google) | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
// Our analytics tracking id for salesforce production. |
OlderNewer