Skip to content

Instantly share code, notes, and snippets.

View goravseth's full-sized avatar

Gorav Seth goravseth

View GitHub Profile
@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);
}
}
<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>