Place the NPSP Opportunity Action Rail right above the Opportunities related list on your Contact Lightning Page. The buttons will open up the Create Record modal for Opportunity with the Primary Contact & Account pre-populated. It uses the default record type, and your full page layouts (not a quick action!)
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
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce"> | |
<property file="build.properties"/> | |
<property environment="env"/> | |
<!-- Setting default value for username, password and session id properties to empty string | |
so unset values are treated as empty. Without this, ant expressions such as ${sf.username} | |
will be treated literally. | |
--> | |
<condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition> |
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 class LightningValueSetProvider { | |
@AuraEnabled | |
public static List<CustomValue> getValueSetForField(String sObjectName, String fieldName) { | |
List<CustomValue> options = new List<CustomValue>(); | |
Schema.SObjectField field = Schema.getGlobalDescribe().get(sObjectName).getDescribe().fields.getMap().get(fieldName); | |
for (PicklistEntry value : field.getDescribe().getPicklistValues()) { | |
options.add(new CustomValue(value.getLabel(), value.getValue(), value.isDefaultValue())); | |
} | |
return options; | |
} |
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="Contact" showHeader="false" sidebar="false" applyHtmlTag="false" standardStylesheets="false" docType="html-5.0"> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"/> | |
<title>Wayfinder Story Submission</title> | |
</head> | |
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 Summer16EmailAction { | |
@invocableMethod | |
global static void renderEmailToChatter(List<EmailRequest> emails) { | |
List<ConnectApi.BatchInput> batchInputs = new List<ConnectApi.BatchInput>(); | |
for(EmailRequest email : emails) { | |
ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput(); | |
input.subjectId = email.getFeedId(); | |
ConnectApi.MessageBodyInput body = new ConnectApi.MessageBodyInput(); | |
body.messageSegments = new List<ConnectApi.MessageSegmentInput>(); | |
ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput(); |
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
module SObject exposing (Model, Msg, helpLoad, init, update, view) | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onClick) | |
import Html.App | |
import Http | |
import Json.Decode as Json | |
import Task | |
import Field |
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 QuickData { | |
/* QuickData inserts your Mockaroo Schema, no questions asked. Remote Site needed. | |
* USAGE: QuickData.createRecords('MOCKAROOAPIKEY','20689c00',20,List<Lead>.class); | |
* Creates 20 leads using the schema at https://www.mockaroo.com/20689c00 */ | |
public static List<SObject> createRecords(String a, String s, Integer c, Type t) { | |
String fmtStr = 'https://www.mockaroo.com/{1}/download?count={2}&key={0}'; | |
List<String> reqDetails = new List<String>{a,s,String.valueOf(c)}; | |
string requestString = String.format(fmtStr,reqDetails); | |
HttpRequest req = new HttpRequest(); | |
req.setEndpoint(requestString); |
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
<!-- the devconsole parameter is automatically set when a page is in refresh/preview mode from Developer Console | |
which allows us to only display our custom viewstate debug pane when we're in Developer Mode! --> | |
<apex:pageBlockSection id="debug" title="Debugging" rendered="{!$CurrentPage.parameters.core.apexpages.request.devconsole == '1'}"> | |
<apex:pageBlockTable value="{!clients}" var="client"> | |
<apex:column value="{!client.Name}"/> | |
<apex:column value="{!client.Enrollment_Status__c}"/> | |
<apex:column value="{!client.Referral_Agency__c}"/> | |
<apex:column > | |
<apex:facet name="header">Saved</apex:facet> | |
<apex:outputPanel rendered="{!NOT(ISBLANK(client.Id))}" layout="block"><input disabled="true" type="checkbox" checked="true"/></apex:outputPanel> |
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
// a batch class for every context, by @cdcarter | |
public class SuperBatch implements Database.Batchable<SObject>, Schedulable { | |
// from anon apex, `SuperBatch.startBatch()` starts the job with batch size 100 | |
public static void startBatch() { (new SuperBatch()).doIt(); } | |
public SuperBatch() {} | |
public void doIt() { Database.executeBatch(this,100); } | |
/* create a visualforce page below, and a list button | |
* add the list button to list views to ondemand run the batch (size 100) | |
* <apex:page standardController="SObject" recordSetVar="sobj" |
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
npsp__Trigger_Handler__c th = [SELECT Id FROM npsp__Trigger_Handler__c WHERE npsp__Class__c = 'REL_Relationships_TDTM' LIMIT 1]; | |
th.npsp__Active__c = false; | |
update th; |