Skip to content

Instantly share code, notes, and snippets.

View DataSolveProblems's full-sized avatar
💭
Github Working In Progress

Jie Jenn DataSolveProblems

💭
Github Working In Progress
View GitHub Profile
/**
* Copyright (c), FinancialForce.com, inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
/**
* Copyright (c) 2012, FinancialForce.com, inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
trigger AccountsTrigger on Account (before insert, after delete, after insert, after update, after undelete, before delete, before update) {
fflib_SObjectDomain.triggerHandler(Accounts.class);
}
public class Accounts extends fflib_SObjectDomain {
public Accounts(List<Account>sObjectList) {
super(sObjectList);
}
public class Constructor implements fflib_SObjectDomain.IConstructable {
public fflib_SObjectDomain construct(List<SObject>sObjectList) {
return new Accounts(sObjectList);
}
public class AccountsSelector extends fflib_SObjectSelector {
public List<Schema.SObjectField> getSObjectFieldList() {
return new List<Schema.SObjectField> {
Account.ID, Account.Description, Account.Name, Account.AnnualRevenue
};
}
public Schema.SObjectType getSObjectType() {
return Account.SObjectType;
<apex:page sidebar="false">
<!--Flight Systems Checklist Visualforce Page-->
<h1>StationStatus</h1>
<apex:form id="stationReadinessChecklist">
<apex:pageBlock title="Station Readiness Checklist">
<apex:pageBlockButtons >
<!--Adding Save Button-->
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
public class EmailMissionSpecialist {
// Public method
public void sendMail(String address, String subject, String body) {
// Create an email message object
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {address};
mail.setToAddresses(toAddresses);
mail.setSubject(subject);
mail.setPlainTextBody(body);
// Pass this email message to the built-in sendEmail method
<apex:page >
<apex:image url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}" />
</apex:page>
public class NewCaseListController {
public List<Case> getNewCases(){
List<Case> cases = [select id, CaseNumber from Case where status='New'];
return cases;
}
}
<apex:page controller="NewCaseListController" >
<apex:pageBlock title="New Cases List" id="cases_list">
<li>
<apex:repeat value="{!NewCases}" var="Case" rendered="true" >
<p><apex:outputLink value="/{!Case.ID}">{!Case.CaseNumber}</apex:outputLink></p>
</apex:repeat>
</li>
</apex:pageBlock>