Skip to content

Instantly share code, notes, and snippets.

View goravseth's full-sized avatar

Gorav Seth goravseth

View GitHub Profile
<messaging:emailTemplate subject="vol jobs w shifts" recipientType="Contact" relatedToType="GW_Volunteers__Volunteer_Job__c">
<messaging:HTMLEmailBody>
Dear {!recipient.FirstName},
Here is a list of shifts
<apex:repeat value="{!relatedTo.GW_Volunteers__Volunteer_Hours__r}" var="vh">
<tr>
<th>Job</th>
<th>Start Date</th>
@goravseth
goravseth / CurrencyUpdater
Created October 2, 2017 14:48
Pulls current rates and updates CurrencyType records in SFDC
public class CurrencyUpdater {
list <CurrencyType> ctl = new list<CurrencyType>([SELECT Id,IsoCode,ConversionRate FROM CurrencyType WHERE IsActive = TRUE AND IsCorporate = FALSE]);
map <string, CurrencyType> ctMap = new map<String, CurrencyType>();
public CurrencyUpdater () {
for (CurrencyType ct : ctl){
ctMap.put(ct.IsoCode,ct);
}
}
@goravseth
goravseth / findDupes
Created October 25, 2017 13:16
invocable apex to find duplicate contacts using the new findDuplicates apex stuff
public class Flow_FindDupes {
//https://developer.salesforce.com/forums/?id=906F0000000AzDeIAK
@InvocableMethod(label='Get Dupes' description='Returns something')
public static List<Contact> getDuplicateContacts(List<Contact> contacts) {
system.debug('contacts size = ' + contacts.size());
list<sObject> dasContacts = new list<sobject>();
dasContacts.addall((List<sObject>)(contacts));
list<Contact> duplicateContacts = new list<Contact>();
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes">
<forceChatter:publisher context="RECORD" recordId="0F94F0000008QLySAM" />
<forceChatter:feed type="Record" subjectId="0F94F0000008QLySAM" feedDesign="DEFAULT"/>
</aura:component>
Compromised User / Davice SOP
Freeze user
Notify techsupport (to freeze active directory account)
Revoke activations (setup - security controls - activations). note that both login IPs and activated browsers need to be revoked.
Revoke all oAuth connections (user detail - oAuth connected apps)
Revoke Third Party Account Links (ensures they need to reauthorize for SSO)
Review login history for any anomalies
If there are no anomalies
Add two factor authentication to user profile (permission set - system : two factor authentication required)
{
"swagger": "2.0",
"info": {
"title": "Sample API",
"description": "API description in Markdown.",
"version": "1.0.0"
},
"paths": {
"/": {
"post": {
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
// must be plain text, not rich text.
// ff user id is formula field to pull $user.Id, you can pass any id
{"id" : "{!ffUserID}"}
@goravseth
goravseth / ExternalService_2
Last active May 29, 2020 02:02
adding response schema
{
"swagger": "2.0",
"info": {
"title": "Sample API",
"description": "API description in Markdown.",
"version": "1.0.0"
},
"paths": {
"/": {
"post": {
@goravseth
goravseth / Screensteps API Response w Links
Last active August 4, 2020 12:12
sample api response from screensteps - used to create external service definition via swagger inspector