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
<!-- ServiceComponent.cmp --> | |
<aura:component> | |
<aura:method name="sum" action="{!c.handleSum}"> | |
<aura:attribute name="a" type="Integer" required="true"/> | |
<aura:attribute name="b" type="Integer" required="true"/> | |
</aura:method> | |
</aura:component> |
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
/* controller.js */ | |
({ | |
onActionConfirmed: function(component, event, helper) { | |
helper.callServer(); | |
}) |
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 InvocableApexTemplate { | |
@InvocableMethod( | |
label = 'Name as displayed in Process Builder' | |
description = 'Tooltip as displayed in Process Builder' | |
) | |
public static List<Response> execute( List<Request> requests ) { | |
List<Response> responses = new List<Response>(); | |
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 CaseOpenBizHoursBatchable implements Database.Batchable<SObject>, Database.Stateful { | |
private ID businessHoursId { get; set; } | |
public CaseOpenBizHoursBatchable( ID businessHoursId ) { | |
this.businessHoursId = businessHoursId; | |
} | |
public Database.QueryLocator start( Database.BatchableContext context ) { | |
// Idea behind this query is to get all open cases or |
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 GoogleDocToFilesBatchable implements Database.Batchable<SObject>, Database.Stateful { | |
private ID externalDataSourceId { get; set; } | |
public GoogleDocToFilesBatchable( ID externalDataSourceId ) { | |
this.externalDataSourceId = externalDataSourceId; | |
} | |
public Database.QueryLocator start( Database.BatchableContext context ) { | |
return Database.getQueryLocator([ |
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
SELECT | |
parent.type, | |
count(id), | |
sum(bodyLength) | |
FROM | |
Attachment | |
GROUP BY | |
parent.type |
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
// in apex, the values from multi-select | |
// picklists are simply delimited strings | |
String picklistA = 'Apple;Orange;Banana'; // obj1.picklist__c | |
String picklistB = 'Apple;Pear;Plum;Orange'; // obj2.picklist__c | |
// split the strings into individual values and store as unique sets | |
Set<String> picklistValuesA = new Set<String>( picklistA.split(';') ); | |
Set<String> picklistValuesB = new Set<String>( picklistB.split(';') ); | |
System.debug( 'picklistValuesA: ' + picklistValuesA ); |
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 extensions="SomeController"> | |
<script src="{!$Resource.jquery224}"></script> | |
<script>$j = jQuery.noConflict();</script> | |
<apex:form> | |
<apex:outputPanel id="someSection"> | |
... stuff here ... |
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> | |
<head> | |
<script src="{!$Resource.jquery224}"></script> <!-- https://jquery.com/ --> | |
<script src="{!$Resource.jsforce170}"></script> <!-- https://jsforce.github.io/ --> | |
<script>$j = jQuery.noConflict();</script> | |
</head> | |
<body> | |
<form> |
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
/** | |
* Developed by Doug Ayers (douglascayers.com) | |
* Org62 Case 16584902 | |
* GUS W-006274 | |
* | |
* This test creates a file "new document.txt" with contents "Hello World" | |
* in an external data source, such as Google Drive or SharePoint Online. | |
* | |
* Despite being a unit test it has real side effects in the external system. | |
* |