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
// Maybe everyone already knew this, but equal and in both work for collections | |
// in APEX. | |
Account_Team__c[] ats = [select Id, Account__c from Account_Team__c limit 3]; | |
Set<Id> accId = new Set<Id>(); | |
for (Account_Team__c at : ats) { | |
accId.add(at.Account__c); | |
} | |
Account_Team__c[] accTeams = [ | |
SELECT Account__c, Role__c, User__c | |
FROM Account_Team__c |
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
// If you create a Datetime instance from a date and then create a Date | |
// instance from the year, month and day of the datetime, you probably | |
// won't get the date instance you expect. | |
Datetime dt = Datetime.newInstance(2017,12,31); | |
System.debug('dt: ' + Date.newInstance(dt.year(),dt.month(),dt.day())); | |
Datetime fromdt = Date.valueOf('2017-12-31'); | |
System.debug('date: ' + Date.valueOf('2017-12-31')); | |
System.debug('fromdt: ' + fromdt); | |
System.debug('fromdt Date: ' + Date.newInstance(fromdt.year(),fromdt.month(),fromdt.day())); |
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
-- NOTE Bank is only tied to the original gift, not the adjustment. | |
-- NOTE Bank account number and routing number comes from re_reporter..re_eft | |
-- which is a file that betsy had someone create. we will need it in prod. | |
-- NOTE We have found Annually, Semi-anually, Quarterly, Monthly and | |
-- Bi-monthly schedules in the staging database. | |
-- We can't handle Bi-monthly (twice a month). | |
-- So we create two different monthly records. | |
-- NOTE We can't handle anything if it's other than installment_frequency | |
-- 1 through 6. If there are it will display ERROR in the | |
-- ChargentOrders__Payment_Frequency__c and error on insert into SF. |
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
[Encoding] | |
InputEncoding=UTF8 | |
[WFClient] | |
CPMAllowed=On | |
ClientName=WI_cjt98gmnZcJKYtLo0 | |
HotKey11Shift=(none) | |
HotKey12Shift=(none) | |
HotKey13Shift=(none) | |
HotKey9Shift=(none) |
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
[user] | |
name = John Stein | |
email = john@johnandkerri.com | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
[alias] | |
st = status |
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
Johns-MacBook-Pro:~ johnstein$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
==> This script will install: | |
/usr/local/bin/brew | |
/usr/local/share/doc/homebrew | |
/usr/local/share/man/man1/brew.1 | |
/usr/local/share/zsh/site-functions/_brew | |
/usr/local/etc/bash_completion.d/brew | |
/usr/local/Homebrew | |
==> The following existing directories will be made group writable: | |
/usr/local/bin |
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
select | |
g.id RE_LEGACY_ID__c, | |
r.constituent_id, | |
ree.routingno ChargentOrders__Bank_Routing_Number__c, | |
ree.accountnumber ChargentOrders__Bank_Account_Number__c, | |
coalesce(sfc.AccountId, sfa.Id) ChargentOrders__Account__c, | |
g.constituentbankid RE_BANK_ID__c, | |
case (select accounttype from constituent_bank where id = g.constituentbankid) | |
when 0 then 'Checking' | |
when 1 then 'Savings' |
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
-- Shows some helpful info about gift attributes. | |
-- This SQL is for SQL Server. | |
DECLARE @attr varchar(MAX) | |
SET @attr = 'Legacy Correction' | |
-- Overall Count | |
select count(*) count | |
from giftattributes ga | |
join attributetypes at on ga.attributetypesid = at.attributetypesid |
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 MembershipMigrator { | |
//public MembershipMigrator() { | |
//} | |
// 1968 total | |
public List<Account> listMemberAccounts() { | |
return [ | |
select Id, |
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
{ | |
"AE": "Armed Forces Europe", | |
"AK": "Alaska", | |
"AL": "Alabama", | |
"AP": "Armed Forces Pacific", | |
"AR": "Arkansas", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"CA": "California", | |
"CO": "Colorado", |