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/p.donders@infravision.com | |
* 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
// 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. |
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
trigger CampaignTrigger on Campaign ( before insert ) { | |
List<Campaign> campaigns = Trigger.new; | |
Set<ID> clonedCampaignIds = new Set<ID>(); | |
for ( Campaign campaign : campaigns ) { | |
if ( campaign.isClone() ) { | |
clonedCampaignIds.add( campaign.getCloneSourceId() ); |
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" encoding="UTF-8"?> | |
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<types> | |
<members>*</members> | |
<name>Flow</name> | |
</types> | |
<types> | |
<members>*</members> | |
<name>FlowDefinition</name> | |
</types> |
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 RedirectApexController { | |
public RedirectApexController( ApexPages.StandardController stdController ) {} | |
public PageReference redirect() { | |
// ... do some logic to determine where to redirect to ... | |
PageReference page = new PageReference('/apex/MyPage'); | |
// pass any parameters that came in on request on to the final destination |
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
/** | |
* https://twitter.com/Joy_SH/status/738087166547398656 | |
* https://help.salesforce.com/apex/HTViewSolution?id=000175908&language=en_US | |
*/ | |
public with sharing class LeadConvertedViewController { | |
public Lead record { get; private set; } | |
public LeadConvertedViewController( ApexPages.StandardController stdController ) { | |
this.record = (Lead) queryRecord( stdController.getId() ); |
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
@isTest | |
private class MyTestClass { | |
@isTest | |
static void test_something() { | |
Profile p = [ SELECT id FROM Profile WHERE name = 'Standard User' ]; | |
User user1, user2; |
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:page showHeader="false" showChat="false" sidebar="false" standardStylesheets="false"> | |
<script type="text/javascript"> | |
// URL must be prefixed with http:// or https:// | |
// otherwise it will be considered a relative URL in your Salesforce instance | |
// e.g. https://<your_instance>.visual.force.com/apex/www.google.com | |
window.location = 'https://www.google.com'; | |
</script> | |
</apex:page> |
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
<aura:component> | |
<aura:attribute name="title" type="String" required="true" /> | |
<aura:attribute name="closeable" type="Boolean" default="true"/> | |
<aura:attribute name="closeLabel" type="String" default="Close"/> | |
<aura:attribute name="cancelLabel" type="String" default="Cancel"/> | |
<aura:attribute name="confirmLabel" type="String" default="OK"/> | |
<aura:attribute name="onclose" type="Aura.Action" default="{!c.defaultCloseAction}"/> |
OlderNewer