<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shawn Franklin &#187; Shawn</title>
	<atom:link href="http://shawnfranklin.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://shawnfranklin.com</link>
	<description>Certified Salesforce.com Sales Cloud and Service Cloud Consultant; Certified Salesforce.com Administrator and Developer</description>
	<lastBuildDate>Mon, 09 Jan 2012 16:26:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Now a Salesforce.com Certified Sales Cloud Consultant</title>
		<link>http://shawnfranklin.com/now-a-salesforce-com-certified-sales-cloud-consultant/</link>
		<comments>http://shawnfranklin.com/now-a-salesforce-com-certified-sales-cloud-consultant/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 18:15:57 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Resume]]></category>

		<guid isPermaLink="false">http://shawnfranklin.com/?p=258</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Great news! I just passed the certification exam to gain my “Certified Sales Cloud Consultant” credential. Check out the snazzy new badge on the right. Good preparation paid off here! A lot of the questions regarding account hierarchy, org-wide defaults, &#8230; <a href="http://shawnfranklin.com/now-a-salesforce-com-certified-sales-cloud-consultant/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/now-a-salesforce-com-certified-sales-cloud-consultant/">Now a Salesforce.com Certified Sales Cloud Consultant</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Great news! I just passed the certification exam to gain my “Certified Sales Cloud Consultant” credential. Check out the snazzy new badge on the right.</p>
<p>Good preparation paid off here! A lot of the questions regarding account hierarchy, org-wide defaults, sharing rules, contact roles related list and the partner roles related list on Accounts, Person Accounts, Contacts and Opportunities get rather lengthy when the question is setting up the &#8220;scenario&#8221; that it will ask about it. So towards the end of my exam my head was spinning with all the different &#8220;scenarios&#8221; they set up. It&#8217;s a lot to keep straight and you have to be good at easily forgetting the &#8220;scenario&#8221; from the last question and focusing on the &#8220;scenario&#8221; for the question you are currently answering.</p>
<p><a href="http://shawnfranklin.com/now-a-salesforce-com-certified-sales-cloud-consultant/">Now a Salesforce.com Certified Sales Cloud Consultant</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/now-a-salesforce-com-certified-sales-cloud-consultant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Now a Salesforce.com Certified Service Cloud Consultant</title>
		<link>http://shawnfranklin.com/now-a-salesforce-com-certified-service-cloud-consultant/</link>
		<comments>http://shawnfranklin.com/now-a-salesforce-com-certified-service-cloud-consultant/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 20:12:45 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Resume]]></category>

		<guid isPermaLink="false">http://shawnfranklin.com/?p=247</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Great news! I just passed the certification exam to gain my &#8220;Certified Service Cloud Consultant&#8221; credential. Check out the snazzy new badge on the right. I highly recommend getting certified. It is a rewarding experience. I now have three of &#8230; <a href="http://shawnfranklin.com/now-a-salesforce-com-certified-service-cloud-consultant/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/now-a-salesforce-com-certified-service-cloud-consultant/">Now a Salesforce.com Certified Service Cloud Consultant</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Great news! I just passed the certification exam to gain my &#8220;Certified Service Cloud Consultant&#8221; credential. Check out the snazzy new badge on the right.</p>
<p>I highly recommend getting certified. It is a rewarding experience. I now have three of the seven certifications offered by Salesforce.com. FYI: Here is a link to the <a href="http://certification.salesforce.com/" title="Salesforce.com Certifications" target="_blank">Salesforce.com Certification site</a> to get you started.</p>
<p>My next targeted certification: Sales Cloud Consultant. Although, I do hope that with my background and experience working with the Sales Cloud that the certification will come a little easier than the Service Cloud certification came. </p>
<p>Hope isn&#8217;t a strategy, though. Back to the books!</p>
<p><a href="http://shawnfranklin.com/now-a-salesforce-com-certified-service-cloud-consultant/">Now a Salesforce.com Certified Service Cloud Consultant</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/now-a-salesforce-com-certified-service-cloud-consultant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visualforce Wizard: Contract Standard Object</title>
		<link>http://shawnfranklin.com/visualforce-wizard-contract-standard-object/</link>
		<comments>http://shawnfranklin.com/visualforce-wizard-contract-standard-object/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 16:01:32 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Tech Notes]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/?p=213</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>In this example, I am using the Contract standard object and in this enterprise edition org we have the &#8220;Contract&#8221; standard object renamed as &#8220;Lease&#8221;. Therefore, as you review the code samples below, you have to use &#8220;Contract&#8221; and &#8220;Lease&#8221; &#8230; <a href="http://shawnfranklin.com/visualforce-wizard-contract-standard-object/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/visualforce-wizard-contract-standard-object/">Visualforce Wizard: Contract Standard Object</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>In this example, I am using the Contract standard object and in this enterprise edition org we have the &#8220;Contract&#8221; standard object renamed as &#8220;Lease&#8221;. Therefore, as you review the code samples below, you have to use &#8220;Contract&#8221; and &#8220;Lease&#8221; interchangeably.</p>
<p>The business case here is to provide a visualforce wizard to help speed up data entry and also make the data entry more &#8220;bite size&#8221;. The Lease record, in this case, has near 80 fields to gather user input and spreading that data entry out over 5 steps in the wizard makes each step a little more manageable.</p>
<p>In total, there are:</p>
<ol>
<li>5 visualforce pages</li>
<li>1 apex class</li>
<li>1 apex test class</li>
<li>1 static resource &#8211; a javascript file</li>
</ol>
<p><span id="more-213"></span></p>
<p>Here is a short video demo of what the end user sees:<br />
<object id="scPlayer"  width="600" height="400" type="application/x-shockwave-flash" data="http://content.screencast.com/users/sfranklin04/folders/Jing/media/5ad1a3d7-6c73-4276-84d6-dc5581782fe8/jingswfplayer.swf" ><param name="movie" value="http://content.screencast.com/users/sfranklin04/folders/Jing/media/5ad1a3d7-6c73-4276-84d6-dc5581782fe8/jingswfplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/sfranklin04/folders/Jing/media/5ad1a3d7-6c73-4276-84d6-dc5581782fe8/FirstFrame.jpg&#038;containerwidth=1321&#038;containerheight=829&#038;content=http://content.screencast.com/users/sfranklin04/folders/Jing/media/5ad1a3d7-6c73-4276-84d6-dc5581782fe8/Lease%20Wizard%20Demo.swf&#038;blurover=false" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/sfranklin04/folders/Jing/media/5ad1a3d7-6c73-4276-84d6-dc5581782fe8/" />Unable to display content. Adobe Flash is required.</object></p>
<p>NOTE: For background reference on what I&#8217;m doing on step 3 and 4 (where I allow the end user to enter a custom expression), please refer to <a href="http://www.shawnfranklin.com/2010/04/using-javascript-and-visualforce-to-solve-a-calculation-problem/">this post</a> for more details on how I&#8217;m using the javascript on the page.</p>
<p>Here is the custom controller:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">public class LeaseWizardController {
&nbsp;
    // This variable maintains the state of the wizard. 
    // When users enter data into the wizard, their input is stored in this object. 
    Contract lease;
&nbsp;
    // Properties of this class
    // These variable values are used to pre-populate fields throughout the wizard with data from an associated Opportunity
    public String opptyID {get;set;}
    public String opptyOwnerID {get;set;}
    public String acctID {get;set;}
    public String propID {get;set;}
    public String suiteID {get;set;}
    public Decimal opptyTerm {get;set;}
&nbsp;
    // Create a new List&lt;&gt; that will hold all Suites for this property
    public List&lt;Suite__c&gt; allSuites = new List&lt;Suite__c&gt;();    
    public List&lt;SelectOption&gt; options = new List&lt;SelectOption&gt;();
    public String[] selectedSuiteIds = new String[]{};
    public String[] getselectedSuiteIds() {
        return selectedSuiteIds;
    }
&nbsp;
    public void setSelectedSuiteIds(String[] selectedSuiteIds) {
        this.selectedSuiteIds = selectedSuiteIds;
    }    
&nbsp;
&nbsp;
    // Constructor with no args
    public LeaseWizardController(){
        this.lease = new Contract();
        if ( ApexPages.currentPage().getParameters().get('opptyID') != null ) {
            OpptyValues();
        }
    }
&nbsp;
    // Constructor with 1 arg
    public LeaseWizardController(ApexPages.StandardController stdController) {
        this.lease = (Contract)stdController.getRecord();
        if ( ApexPages.currentPage().getParameters().get('opptyID') != null ) {
            OpptyValues();
        }
    }
&nbsp;
    // Constructor for test methods
    public LeaseWizardController(Contract testLease){
        this.lease = testLease;
        if ( ApexPages.currentPage().getParameters().get('opptyID') != null ) {
            OpptyValues();
        }
    }   
&nbsp;
    // This method returns a Contract variable. If this is the first time the method is called, it creates an empty record for the variable.    
    public Contract getContract() {
        if(lease == null) lease = new Contract(); 
        return lease;
    }
&nbsp;
    // This methods consumes the opptyID URL parmeter and then sets the public properties equal to the values from the Opportunity
    public void OpptyValues() {
        // Keep the Oppty ID in a variable
        opptyID = ApexPages.currentPage().getParameters().get('opptyID');
        // Use the Oppty ID variable to query the database for all the Oppty field values we need later
        // See &quot;Using SOQL Queries That Return One Record&quot; in the Apex Code Developer Guide for this practice
        // http://www.salesforce.com/us/developer/docs/apexcode/index.htm
        List&lt;Opportunity&gt; o = [Select o.Transaction_Type__c, o.Total_K_W__c, o.Term__c, o.Tenant_Broker_Contact__c, o.Tenant_Broker_Account__c, o.Rentable_sf__c, o.Raised_Floor_sf__c, o.Property__c, o.Product_Type__c, o.OwnerId, o.Landlord_Broker_Contact__c, o.Landlord_Broker_Account__c, o.Id, o.Commencement_Date__c, o.CloseDate, o.AccountId From Opportunity o Where o.Id = :opptyID];
        // Set the public properties of this controller equal to a field value from the associated Oppty
        // Begin with all the relationships to other objects: Account, Contact, Opportunity, Property, Suite and Users already selected on the Opportunity 
                lease.Opportunity__c = opptyID;
                acctID = o[0].AccountId;
                lease.AccountId = acctID;
                propID = o[0].Property__c;
                lease.Property__c = propID;
                opptyOwnerID = o[0].OwnerId;
                lease.Sales_Director__c = opptyOwnerID;
                lease.VP_Sales__c = [Select u.ManagerId, u.Id From User u Where u.Id = :opptyOwnerID].ManagerId;
                lease.Landlord_Broker_Account__c = o[0].Landlord_Broker_Account__c;
                lease.Landlord_Broker__c = o[0].Landlord_Broker_Contact__c;
                lease.Tenant_Broker_Account__c = o[0].Tenant_Broker_Account__c;
                lease.Tenant_Broker__c = o[0].Tenant_Broker_Contact__c;                 
        // Now, prepopulate as many fields as possible from data on the associated Opportunity
                lease.Rent_Start__c = o[0].Commencement_Date__c;
                lease.Transaction_Type__c = o[0].Transaction_Type__c;
                lease.Unit_Type__c = o[0].Product_Type__c;
                lease.NRSF__c = o[0].Rentable_sf__c;
                lease.kW_per_Lease__c = o[0].Total_K_W__c;
                lease.Raised_sf__c = o[0].Raised_Floor_sf__c;
                opptyTerm = o[0].Term__c;
                lease.ContractTerm = opptyTerm.intValue();
                lease.Contractual_Term__c = opptyTerm;
                lease.Term__c = opptyTerm;
                lease.StartDate = o[0].CloseDate;
    }
&nbsp;
    // These methods control navigation through the wizard. Each returns a PageReference for one of the vf pages 
    // in the wizard. Note that the redirect attribute does not need to be set on the PageReference because the URL does not need to change 
    // when users move from page to page.    
&nbsp;
    public PageReference step1() {
        return Page.LeaseStep1;
    }
&nbsp;
    public PageReference step2() {
        return Page.LeaseStep2;
    }
&nbsp;
    public PageReference step3() {
        return Page.LeaseStep3;
    }   
&nbsp;
    public PageReference step4() {
        return Page.LeaseStep4;
    }  
&nbsp;
    // This query will return all child Suite records of the user-selected Property
    // The user entering the new Lease will choose from these records to make the association between the Lease and the Property / Suite(s)
    public List&lt;SelectOption&gt; getSuiteRecords() {
        // Query the db for all Suites related to the user-selected property record
        allSuites = [Select s.Id, s.Name, s.Property__c, s.Property__r.Name, s.Total_Raised_Floor_sqft__c, s.Total_Rentable_sqft__c, s.RecordType.Name From Suite__c s Where (s.Property__c = :propID) Order By s.Name];
        // Create an integer variable that we can increment in our for loop
        Integer i = 0;
        // Iterate over all the related Suite records and add them as SelectOptions to our public List&lt;&gt; variable named 'options'
        if(allSuites != null) {
            for(Suite__c s : allSuites) {
                options.add(new SelectOption(allSuites[i].Id, allSuites[i].Name));
                i++;
            }
        }
        return options;
    }
&nbsp;
    public void clearOptions(){
        // If the user changes the property record, we need to empty the list if there are any elements in it
        allSuites.clear();
        options.clear(); 
        // Empty the propID variable
        propID = null;
        // Capture the ID of the new user-selected property record
        propID = lease.Property__c;                
    }   
&nbsp;
    // This method cancels the wizard, and returns the user to the Lease tab
    public PageReference cancel() {
        return new PageReference('/800/o');
    }
&nbsp;
    public PageReference save() {
        // Save the new lease to the database so that all validation rules and formula fields are evaluated.
        if(lease != null) {
            lease.Status = 'Draft';
            upsert lease;
        }
        // Create a new LeaseSuiteAssociation for each Suite records chosen by the user
        if(selectedSuiteIds != null &amp;&amp; lease != null) {
            for (String s : selectedSuiteIds) {
                LeasedSuite__c leasedSuite = new LeasedSuite__c();
                leasedSuite.Lease__c = lease.Id;
                leasedSuite.Suite__c = s;
                insert leasedSuite;                
            }
        }
        // After the new lease is saved to the database, send the user to last step in the wizard and provide the ID of the new lease record.
        if (lease != null){
                String lid = lease.Id;
                return new PageReference('/' + lid);
                // Change the PageReference above to '/apex/LeaseStep5?id=' + lid if you want the wizard to end on the LeaseStep5 vf page
        }else{
                return new PageReference('/800/o');
        }
    }   
}</pre></td></tr></table></div>

<p>Here is the apex test class:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">@IsTest
private class TestLeaseWizard{
&nbsp;
    private final Contract contract;
&nbsp;
    public TestLeaseWizard(ApexPages.StandardController LeaseWizardController) {
        this.contract = (Contract)LeaseWizardController.getRecord();
    }
&nbsp;
    static testmethod void testOpptyValues(){
        // Create an Account, Property, Suite and Opportunity record to use as test data.
        // Add all necessary field values to pass validation rules and field requirements for each object.
        Account acct = new Account(name='foobar');
            acct.Vertical__c = 'Internet Enterprise';
            insert acct;
        Property__c prop = new Property__c();
            prop.name = 'foo';
            insert prop;
        Suite__c suite = new Suite__c();
            suite.name = 'bar';
            suite.Property__c = prop.id;
            suite.RecordTypeId = '012800000006Kgh';
            insert suite;
        Opportunity opp = new Opportunity();
            opp.Name = 'TEST - TEST - TEST';
            opp.StageName = 'Initial Inquiry';
            opp.Property__c = prop.id;
            opp.Suite_Lookup__c = suite.id;
            opp.AccountId = acct.id;
            opp.RecordTypeId = '012300000004r5k';
            opp.Product_Type__c = 'Turn-Key Datacenter';
            opp.Lease_Type__c = 'NNN';
            opp.Lease_Category__c = 'Technical Space';
            opp.Transaction_Type__c = 'New';
            opp.LeadSource = 'Word of Mouth';
            date d = Date.today();
            opp.CloseDate = d + 100;
            opp.Commencement_Date__c = d + 200;
            opp.Term__c = 120;
            opp.Total_K_W__c = 1125;
            opp.Raised_Floor_sf__c = 5000;
            opp.Month_1_Rent__c = 123.45;
            opp.Annual_Increase__c = '3';
            opp.Avg_Monthly_Rent_per_Square_Foot__c = 123.45;
            opp.Starting_kW__c = 123.45;
            opp.Broker_Representation__c = 'Yes'; 
            insert opp;
        PageReference pageRef = Page.LeaseStep1;
        Test.setCurrentPage(pageRef);         
        test.startTest();
        // Set the 'opptyID' URL parameter equal to the id value of our test Opportunity
        ApexPages.currentPage().getParameters().put('opptyID',opp.Id);
        // Instantiate the controller for the Lease Wizard
        LeaseWizardController controller = new LeaseWizardController();
        if (opp.Id != null){
            controller.OpptyValues();
            System.assertEquals(controller.opptyID, opp.Id);
        }
        test.stopTest();
    }
&nbsp;
    static testmethod void testStep1(){
        PageReference pageRef = Page.LeaseStep2;
        Test.setCurrentPage(pageRef);
        Account s = new Account(name='test');
        insert s;         
        date d = Date.today();        
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;        
        insert contTest;        
        LeaseWizardController controller = new LeaseWizardController();
        //The .getURL will return the page url the Save() method returns.
        String nextPage = controller.step1().getUrl();
        //Check that the save() method returns the proper URL.
        System.assertEquals('/apex/leasestep1', nextPage);     
    }     
&nbsp;
    static testmethod void testStep2(){
        PageReference pageRef = Page.LeaseStep1;
        Test.setCurrentPage(pageRef);
        Account s = new Account(name='test');
        insert s;        
        date d = Date.today();        
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;        
        insert contTest;        
        LeaseWizardController controller = new LeaseWizardController();
        //The .getURL will return the page url the Save() method returns.
        String nextPage = controller.step2().getUrl();
        //Check that the save() method returns the proper URL.
        System.assertEquals('/apex/leasestep2', nextPage);            
    }
&nbsp;
    static testmethod void testStep3(){
        PageReference pageRef = Page.LeaseStep2;
        Test.setCurrentPage(pageRef);
        Account s = new Account(name='test');
        insert s;
        date d = Date.today();        
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;        
        insert contTest;        
        LeaseWizardController controller = new LeaseWizardController();
        //The .getURL will return the page url the Save() method returns.
        String nextPage = controller.step3().getUrl();
        //Check that the save() method returns the proper URL.
        System.assertEquals('/apex/leasestep3', nextPage);     
    }
&nbsp;
    static testmethod void testStep4(){
        PageReference pageRef = Page.LeaseStep3;
        Test.setCurrentPage(pageRef);
        Account s = new Account(name='test');
        insert s;         
        date d = Date.today();        
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;        
        insert contTest;        
        LeaseWizardController controller = new LeaseWizardController();
        //The .getURL will return the page url this method returns.
        String nextPage = controller.step4().getUrl();
        //Check that the save() method returns the proper URL.
        System.assertEquals('/apex/leasestep4', nextPage);     
    }
&nbsp;
    static testmethod void testSave(){
        PageReference pageRef = Page.LeaseStep4;
        Test.setCurrentPage(pageRef);
        Account s = new Account(name='test');
        insert s;         
        date d = Date.today();        
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;        
        insert contTest;        
        if (contTest != null){
            LeaseWizardController controller = new LeaseWizardController(contTest);
            //The .getURL will return the page url this method returns.
            String nextPage = controller.save().getUrl();
            // Set what URL we expect to be returned by the save() method
            String expected = '/' + contTest.Id;
            //Check that the save() method returns the proper URL.
            System.assertEquals(expected, nextPage);
        }     
    }    
&nbsp;
    static testmethod void testCancel(){
        PageReference pageRef = Page.LeaseStep1;
        Test.setCurrentPage(pageRef);
        LeaseWizardController controller = new LeaseWizardController();        
        //The .getURL will return the page url the cancel() method returns.
        String nextPage = controller.cancel().getUrl();
        //Check that the save() method returns the proper URL.
        System.assertEquals('/800/o', nextPage);     
    }
&nbsp;
    static testmethod void testConstructor(){
        PageReference pageRef = Page.LeaseStep3;
        Test.setCurrentPage(pageRef);
        // Create dummy data
        Account acct = new Account(name='foobar');
            acct.Vertical__c = 'Internet Enterprise';
            insert acct;
        Property__c prop = new Property__c();
            prop.name = 'foo';
            insert prop;
        Suite__c suite = new Suite__c();
            suite.name = 'bar';
            suite.Property__c = prop.id;
            suite.RecordTypeId = '012800000006Kgh';
            insert suite;        
        Opportunity opp = new Opportunity();
            opp.Name = 'TEST - TEST - TEST';
            opp.StageName = 'Initial Inquiry';
            opp.Property__c = prop.id;
            opp.Suite_Lookup__c = suite.id;
            opp.AccountId = acct.id;
            opp.RecordTypeId = '012300000004r5k';
            opp.Product_Type__c = 'Turn-Key Datacenter';
            opp.Lease_Type__c = 'NNN';
            opp.Lease_Category__c = 'Technical Space';
            opp.Transaction_Type__c = 'New';
            opp.LeadSource = 'Word of Mouth';
            date d = Date.today();
            opp.CloseDate = d + 100;
            opp.Commencement_Date__c = d + 200;
            opp.Term__c = 120;
            opp.Total_K_W__c = 1125;
            opp.Raised_Floor_sf__c = 5000;
            opp.Month_1_Rent__c = 123.45;
            opp.Annual_Increase__c = '3';
            opp.Avg_Monthly_Rent_per_Square_Foot__c = 123.45;
            opp.Starting_kW__c = 123.45;
            opp.Broker_Representation__c = 'Yes'; 
            insert opp;        
        // Set the 'opptyID' URL parameter equal to the id value of our test Opportunity
        ApexPages.currentPage().getParameters().put('opptyID',opp.Id);        
        Account s = new Account(name='test');
        insert s;         
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;
        insert contTest;        
        LeaseWizardController controller = new LeaseWizardController(contTest);
        System.assertNotEquals(null, controller);   
    }  
&nbsp;
    static testmethod void testGetContract(){
        PageReference pageRef = Page.LeaseStep3;
        Test.setCurrentPage(pageRef);
        Account s = new Account(name='test');
        insert s;         
        date d = Date.today();        
        Contract contTest = new Contract();
        contTest.Status = 'Draft';
        contTest.StartDate = d + 7;
        contTest.AccountId = s.Id;
        contTest.NRSF__c = 5000;
        contTest.Raised_sf__c = 4500;
        contTest.kW_per_Lease__c = 1125;        
        insert contTest;        
        LeaseWizardController controller = new LeaseWizardController(contTest);
        System.assertNotEquals(null, controller.getContract());     
    }
&nbsp;
    static testmethod void testGetSuiteRecords(){
        // Create dummy data
        Property__c prop = new Property__c();
            prop.name = 'foo';
            insert prop;
        // Create 3 Suite records we would expect returned from our query
        Suite__c suite1 = new Suite__c();
            suite1.name = 'bar';
            suite1.Property__c = prop.id;
            suite1.RecordTypeId = '012800000006Kgh';
            insert suite1;
        Suite__c suite2 = new Suite__c();
            suite2.name = 'bar';
            suite2.Property__c = prop.id;
            suite2.RecordTypeId = '012800000006Kgh';
            insert suite2;
        Suite__c suite3 = new Suite__c();
            suite3.name = 'bar';
            suite3.Property__c = prop.id;
            suite3.RecordTypeId = '012800000006Kgh';
            insert suite3;            
        PageReference pageRef = Page.LeaseStep1;
        Test.setCurrentPage(pageRef);         
        test.startTest();
        // Instantiate the controller for the Lease Wizard
        LeaseWizardController controller = new LeaseWizardController();
        controller.propID = prop.id;
        controller.getSuiteRecords();
        System.assertEquals(controller.allSuites.size(), 3);
        System.assertEquals(controller.options.size(), 3);
        test.stopTest();
    }         
}</pre></td></tr></table></div>

<p>Here is step 1 of the visualforce wizard:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page standardController=&quot;Contract&quot; extensions=&quot;LeaseWizardController&quot; tabStyle=&quot;Contract&quot; sidebar=&quot;false&quot; wizard=&quot;true&quot;&gt;
&lt;style&gt;
.equalWidth{ width:200px; }
&lt;/style&gt;
&lt;apex:includeScript value=&quot;{!$Resource.LeaseWizardScript}&quot;/&gt;
  &lt;apex:sectionHeader title=&quot;New Lease Wizard&quot; subtitle=&quot;Step 1 of 5&quot;/&gt;
&nbsp;
    &lt;apex:form &gt;
        &lt;apex:pageBlock title=&quot;Enter the lease details&quot; mode=&quot;edit&quot;&gt;
                &lt;div style=&quot;margin:5px; padding:5px;&quot;&gt;
                &lt;h1&gt;Instructions&lt;/h1&gt;&lt;br/&gt;&lt;br/&gt;
        In this wizard, you will create a new Lease record. Please note:
        &lt;ol&gt;
            &lt;li&gt;If you are on this page after having clicked the &quot;Create New Lease&quot; button on an Opportunity record, you will see various fields throughout this wizard pre-populated for you. You can change those values or leave them as is.&lt;/li&gt;
            &lt;li&gt;Fields marked with a red highlight are required to continue.&lt;/li&gt;
            &lt;li&gt;There is a small &quot;?&quot; icon next to each field. You can mouse over them for additional context to the fields intention or meaning.&lt;/li&gt;
        &lt;/ol&gt;
        &lt;/div&gt;      
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Customer Information&quot; columns=&quot;1&quot;&gt;
            &lt;apex:inputField id=&quot;account&quot; value=&quot;{!contract.AccountId}&quot;/&gt;
            &lt;apex:inputField id=&quot;coNameOnLease&quot; value=&quot;{!contract.Co_Name_on_Lease__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;industryCategory&quot; value=&quot;{!contract.Industry_Category__c}&quot;/&gt;
        &lt;/apex:pageBlockSection&gt;
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Prior Lease (if renewal or re-lease)&quot; columns=&quot;1&quot;&gt;
            &lt;apex:inputField id=&quot;renewalLease&quot; value=&quot;{!contract.Prior_Lease__c}&quot;/&gt;            
        &lt;/apex:pageBlockSection&gt;
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Dates&quot; columns=&quot;1&quot;&gt;
            &lt;apex:inputField id=&quot;signDate&quot; value=&quot;{!contract.Sign_Date__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;startDate&quot; value=&quot;{!contract.StartDate}&quot;/&gt;
            &lt;apex:inputField id=&quot;contStartDate&quot; value=&quot;{!contract.Contractual_Start_Date__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;rentStart&quot; value=&quot;{!contract.Rent_Commencement__c}&quot;/&gt;            
            &lt;apex:inputField id=&quot;contRentComm&quot; value=&quot;{!contract.Contractual_Rent_Commencement__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;leaseEndDate&quot; value=&quot;{!contract.Expiration_Date__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;original&quot; value=&quot;{!contract.Original_Term_Expiration_Date__c}&quot;/&gt;            
        &lt;/apex:pageBlockSection&gt; 
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Categories&quot; columns=&quot;1&quot;&gt;
            &lt;apex:inputField id=&quot;leaseCategory&quot; value=&quot;{!contract.Lease_Category__c}&quot; styleClass=&quot;equalWidth&quot; /&gt;
            &lt;apex:inputField id=&quot;transactionType&quot; value=&quot;{!contract.Transaction_Type__c}&quot; styleClass=&quot;equalWidth&quot; /&gt;
            &lt;apex:inputField id=&quot;unitType&quot; value=&quot;{!contract.Unit_Type__c}&quot; styleClass=&quot;equalWidth&quot; /&gt;
        &lt;/apex:pageBlockSection&gt;                 
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Description&quot; columns=&quot;1&quot;&gt;
            &lt;apex:inputField id=&quot;description&quot; value=&quot;{!contract.description}&quot; style=&quot;width:400px;&quot;/&gt;
            &lt;apex:inputField id=&quot;comments&quot; value=&quot;{!contract.Comments__c}&quot; style=&quot;width:400px;&quot;/&gt;
        &lt;/apex:pageBlockSection&gt;
&nbsp;
        &lt;apex:pageBlockButtons &gt;
            &lt;apex:commandButton action=&quot;{!step2}&quot; value=&quot;Next&quot;/&gt;
            &lt;apex:commandLink value=&quot;Cancel&quot; action=&quot;{!cancel}&quot; onclick=&quot;return confirmCancel()&quot; immediate=&quot;true&quot;/&gt;            
        &lt;/apex:pageBlockButtons&gt;        
&nbsp;
      &lt;/apex:PageBlock&gt;
    &lt;/apex:form&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is step 2 of the visualforce wizard:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page standardController=&quot;Contract&quot; extensions=&quot;LeaseWizardController&quot; sidebar=&quot;false&quot; wizard=&quot;true&quot;&gt;
&lt;apex:includeScript value=&quot;{!$Resource.LeaseWizardScript}&quot;/&gt;
  &lt;apex:sectionHeader title=&quot;New Lease Wizard&quot; subtitle=&quot;Step 2 of 5&quot;/&gt;
      &lt;apex:form &gt;
      &lt;apex:pageBlock title=&quot;Enter the lease details&quot; mode=&quot;edit&quot;&gt;  
        &lt;div style=&quot;margin:5px; padding:5px;&quot;&gt;
        &lt;h1&gt;Instructions&lt;/h1&gt;&lt;br/&gt;&lt;br/&gt;
        In this step, you will select the Property and Suite(s) associated with this Lease. You can either:
        &lt;ol&gt;
            &lt;li&gt;Select NO Suite(s)&lt;/li&gt;
            &lt;li&gt;Select only ONE Suite&lt;/li&gt;
            &lt;li&gt;Select MULTIPLE Suites&lt;/li&gt;
        &lt;/ol&gt;
        &lt;/div&gt;
      &lt;apex:pageBlockSection title=&quot;Property&quot; columns=&quot;1&quot;&gt;
        &lt;apex:inputField value=&quot;{!contract.Property__c}&quot;&gt;
            &lt;apex:actionSupport event=&quot;onchange&quot; action=&quot;{!clearOptions}&quot; rerender=&quot;suiteTable&quot; status=&quot;status&quot; /&gt;
            &lt;apex:actionStatus id=&quot;status&quot; startText=&quot;Refreshing...&quot; startStyle=&quot;font-weight:bold; font-size:14pt; color:red;&quot; stopText=&quot;Make your selection below:&quot; stopStyle=&quot;font-weight:bold; font-size:14pt; color:green;&quot;&gt;&lt;/apex:actionStatus&gt;                       
        &lt;/apex:inputField&gt;
      &lt;/apex:pageBlockSection&gt;      
&nbsp;
      &lt;apex:pageBlockSection id=&quot;suiterecords&quot; title=&quot;Suite(s)&quot; columns=&quot;1&quot;&gt;
        This information entered below is input by the Region Analysts. Please alert the correct Region Analyst if the below information should be corrected or if a new Suite record is needed. If a new Suite record is needed, you can proceed with this wizard and add the Suite to this Lease later.
        &lt;apex:selectCheckboxes value=&quot;{!selectedSuiteIds}&quot; id=&quot;suiteTable&quot; layout=&quot;pageDirection&quot;&gt;
            &lt;apex:selectOptions value=&quot;{!suiterecords}&quot;/&gt;&lt;br/&gt;
        &lt;/apex:selectCheckboxes&gt;        
      &lt;/apex:pageBlockSection&gt;
&nbsp;
        &lt;apex:pageBlockButtons &gt;
            &lt;apex:commandButton action=&quot;{!step1}&quot; value=&quot;Previous&quot;/&gt;
            &lt;apex:commandButton action=&quot;{!step3}&quot; value=&quot;Next&quot;/&gt;
            &lt;apex:commandLink value=&quot;Cancel&quot; action=&quot;{!cancel}&quot; onclick=&quot;return confirmCancel()&quot; immediate=&quot;true&quot;/&gt;
        &lt;/apex:pageBlockButtons&gt;        
&nbsp;
      &lt;/apex:PageBlock&gt;
    &lt;/apex:form&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is step 3 of the visualforce wizard:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page standardController=&quot;Contract&quot; extensions=&quot;LeaseWizardController&quot; sidebar=&quot;false&quot; wizard=&quot;true&quot;&gt;
&lt;apex:includeScript value=&quot;{!$Resource.LeaseWizardScript}&quot;/&gt;
&lt;apex:sectionHeader title=&quot;New Lease Wizard&quot; subtitle=&quot;Step 3 of 5&quot;/&gt;
    &lt;apex:form &gt;
&nbsp;
    &lt;apex:pageBlock id=&quot;custCalcs&quot;&gt;
&nbsp;
        &lt;apex:pageBlockButtons &gt;
            &lt;apex:commandButton action=&quot;{!step2}&quot; value=&quot;Previous&quot;/&gt;
            &lt;apex:commandButton action=&quot;{!step4}&quot; value=&quot;Next&quot; /&gt;
            &lt;apex:commandLink value=&quot;Cancel&quot; action=&quot;{!cancel}&quot; onclick=&quot;return confirmCancel()&quot; immediate=&quot;true&quot;/&gt;                           
        &lt;/apex:pageBlockButtons&gt;       
        &lt;div style=&quot;margin:5px; padding:5px;&quot;&gt;
        &lt;h1&gt;Instructions&lt;/h1&gt;&lt;br/&gt;&lt;br/&gt;
        In this step, you can enter all information regarding Square Feet, Power, Term, GAAP, Incremental GAAP, etc.
        &lt;/div&gt;        
        &lt;apex:pageBlockSection title=&quot;Square Feet and Power Commitments&quot; columns=&quot;1&quot;&gt;
            &lt;apex:inputField id=&quot;nrsf&quot; value=&quot;{!Contract.NRSF__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;raised&quot; value=&quot;{!Contract.Raised_sf__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;kW&quot; value=&quot;{!Contract.kW_per_Lease__c}&quot;/&gt;         
            &lt;apex:inputField id=&quot;mtm&quot; value=&quot;{!Contract.Month_to_Month__c}&quot;/&gt;
            &lt;apex:inputField id=&quot;avgRentEsc&quot; value=&quot;{!contract.Avg_Rent_Escalations__c}&quot;/&gt;
        &lt;/apex:pageBlockSection&gt;        
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Enter Custom Expressions Here&quot; columns=&quot;1&quot;&gt;
&nbsp;
        &lt;div style=&quot;margin:5px; padding:5px;&quot;&gt;
        To use the custom expression fields below, follow these three steps: 
        &lt;ol&gt;
            &lt;li&gt;Enter the formula in the first field. Ex: (250000 * 12) / 12&lt;/li&gt;
            &lt;li&gt;Click the &quot;=&quot; button&lt;/li&gt;
            &lt;li&gt;The formula will evaluate and the value will be stored in the second field.&lt;/li&gt;
        &lt;/ol&gt;
        &lt;/div&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Example:&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;input value=&quot;(250000 * 120)/4&quot; style=&quot;width:400px;&quot; /&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; /&gt;
                    &lt;input value=&quot;7500000&quot; /&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Contractual Term&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Contractual_Term__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Contractual_Term__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Term&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Term__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Term__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;  
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Contractual Total Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Contractual_Total_Rent__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Contractual_Total_Rent__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;                                          
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Total Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Total_Rent__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Total_Rent__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt; 
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Contractual Incremental GAAP Ann Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Contractual_Incremental_GAAP_Ann__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Contractual_Incremental_GAAP_Ann_Revenue__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;              
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Incremental GAAP Ann Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Incremental_GAAP_Ann_Rent__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Incremental_GAAP_Annual_Revenue__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;  
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;TI/LW&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Total_TI_LW_IF__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Total_TI_LW_IF__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;                  
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Renewing First Year’s Cash Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_First_Years_Cash_Rent__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Renewing_First_Year_s_Cash_Rent__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Renewal Expiring Last Year Cash Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Renewal_Expiring_Last_Year__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Expiring_Last_Year_s_Cash_Rent__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Prior Lease GAAP Annual Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Prior_Lease_GAAP_Ann_Rent__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Prior_Lease_GAAP_Ann_Rent__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;  
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Prior Lease Last Year's Cash Rent&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Prior_Lease_Last_Years_Cash_Rent__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
                    &lt;apex:inputField value=&quot;{!Contract.Prior_Lease_Last_Years_Cash_Rent__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;                                      
&nbsp;
        &lt;/apex:pageBlockSection&gt;            
&nbsp;
    &lt;/apex:pageBlock&gt;  
&nbsp;
    &lt;/apex:form&gt;
&nbsp;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is step 4 of the visualforce wizard:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page standardController=&quot;Contract&quot; extensions=&quot;LeaseWizardController&quot; sidebar=&quot;false&quot; wizard=&quot;true&quot;&gt;
&lt;apex:includeScript value=&quot;{!$Resource.LeaseWizardScript}&quot;/&gt;
  &lt;apex:sectionHeader title=&quot;New Lease Wizard&quot; subtitle=&quot;Step 4 of 5&quot;/&gt;
    &lt;apex:form &gt;
      &lt;apex:pageBlock title=&quot;Enter the lease details&quot; mode=&quot;edit&quot;&gt;
&nbsp;
        &lt;apex:pageBlockSection title=&quot;Commissions&quot; columns=&quot;1&quot;&gt;    
&nbsp;
        &lt;div&gt;
        How do I use this?
        &lt;ol&gt;
            &lt;li&gt;Enter the formula in the first field. Ex: (250000 * 12) / 12&lt;/li&gt;
            &lt;li&gt;Click the &quot;=&quot; button&lt;/li&gt;
            &lt;li&gt;The formula will evaluate and the value will be stored in the second field.&lt;/li&gt;
        &lt;/ol&gt;
        &lt;/div&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Example:&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;input value=&quot;(250000 * 120)/4&quot; style=&quot;width:400px;&quot; /&gt;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; /&gt;
                    &lt;input value=&quot;7500000&quot; /&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;                 
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Sales Director Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Sales_Director_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Sales_Director_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Split Sales Director Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Split_Sales_Director_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Split_Sales_Director_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;            
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;VP Sales Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_VP_Sales_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.VP_Sales_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Split VP Sales Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Split_VP_Sales_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Split_VP_Sales_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;            
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;SVP Sales Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_SVP_Sales_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.SVP_Sales_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Channel Sales VP Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Channel_Sales_VP_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Channel_Sales_VP_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;                            
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Landlord Broker Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Landlord_Broker_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Landlord_Broker_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;            
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Tenant Broker Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Tenant_Broker_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Tenant_Broker_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt; 
&nbsp;
            &lt;apex:pageBlockSectionItem &gt;
                &lt;apex:outputLabel value=&quot;Referring Agent Commission&quot; /&gt;
                &lt;apex:outputPanel &gt;
                    &lt;apex:inputField value=&quot;{!Contract.Audit_Referring_Agent_Commission__c}&quot; style=&quot;width:400px;&quot; id=&quot;equation&quot; 
                        onkeypress=&quot;if ((window.event ? event.keyCode : event.which) == 13) { this.form.elements['{!$Component.answer}'].value = calculate(this.value); }&quot;/&gt;
&nbsp;
                    &lt;input type=&quot;button&quot; value=&quot; = &quot; onclick=&quot;this.form.elements['{!$component.answer}'].value = calculate(this.form.elements['{!$component.equation}'].value);&quot; /&gt;
&nbsp;
                    &lt;apex:inputField value=&quot;{!Contract.Referring_Agent_Commission__c}&quot; id=&quot;answer&quot;/&gt;
                &lt;/apex:outputPanel&gt;
            &lt;/apex:pageBlockSectionItem&gt;                                   
        &lt;/apex:pageBlockSection&gt;  
&nbsp;
        &lt;apex:pageBlockSection title=&quot;DLR Sales Team&quot; columns=&quot;2&quot;&gt;        
            &lt;apex:inputField value=&quot;{!Contract.Sales_Director__c}&quot; id=&quot;salesDirector&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Split_Sales_Director__c}&quot; id=&quot;splitSalesDirector&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.VP_Sales__c}&quot; id=&quot;vpSales&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Split_VP__c}&quot; id=&quot;splitVP&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.SVP_Sales__c}&quot; id=&quot;svpSales&quot;/&gt;       
        &lt;/apex:pageBlockSection&gt;         
&nbsp;
        &lt;apex:pageBlockSection title=&quot;External Brokers &amp; Agents&quot; columns=&quot;2&quot;&gt;        
            &lt;apex:inputField value=&quot;{!Contract.Landlord_Broker_Account__c}&quot; id=&quot;landlordBrokerAccount&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Landlord_Broker__c}&quot; id=&quot;landlordBroker&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Tenant_Broker_Account__c}&quot; id=&quot;tenantBrokerAccount&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Tenant_Broker__c}&quot; id=&quot;tenantBroker&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Referring_Agent_Account__c}&quot; id=&quot;referringAgentAccount&quot;/&gt;
            &lt;apex:inputField value=&quot;{!Contract.Referring_Agent__c}&quot; id=&quot;referringAgent&quot;/&gt;        
        &lt;/apex:pageBlockSection&gt; 
&nbsp;
        &lt;apex:pageBlockButtons &gt;
          &lt;apex:commandButton action=&quot;{!step3}&quot; value=&quot;Previous&quot;/&gt;          
          &lt;apex:commandButton action=&quot;{!save}&quot; value=&quot;Save &amp; Review&quot;/&gt;
          &lt;apex:commandLink value=&quot;Cancel&quot; action=&quot;{!cancel}&quot; onclick=&quot;return confirmCancel()&quot; immediate=&quot;true&quot;/&gt;          
        &lt;/apex:pageBlockButtons&gt;        
&nbsp;
      &lt;/apex:PageBlock&gt;
    &lt;/apex:form&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>NOTE: Step 5 of the visualforce wizard is simply a &#8216;confirmation&#8217; page that returns the user to the standard Contract details page of the newly-created record.</p>
<p><a href="http://shawnfranklin.com/visualforce-wizard-contract-standard-object/">Visualforce Wizard: Contract Standard Object</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/visualforce-wizard-contract-standard-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Example Force.com Site Apex and Visualforce</title>
		<link>http://shawnfranklin.com/example-force-com-site-apex-and-visualforce/</link>
		<comments>http://shawnfranklin.com/example-force-com-site-apex-and-visualforce/#comments</comments>
		<pubDate>Thu, 26 May 2011 18:37:51 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/?p=228</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>I thought I would post my apex and visualforce code used to build my first Force.com Site &#8211; the one listed on the Force.com Sites Gallery. In total, it is: 1 apex class &#8211; custom extension 1 apex test class &#8230; <a href="http://shawnfranklin.com/example-force-com-site-apex-and-visualforce/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/example-force-com-site-apex-and-visualforce/">Example Force.com Site Apex and Visualforce</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>I thought I would post my apex and visualforce code used to build <a href="http://www.shawnfranklin.com/2010/08/my-first-force-com-site/">my first Force.com Site</a> &#8211; the one <a href="http://www.shawnfranklin.com/2010/08/listed-on-the-force-com-sites-gallery/">listed on the Force.com Sites Gallery</a>.</p>
<p>In total, it is:</p>
<ol>
<li>1 apex class &#8211; custom extension</li>
<li>1 apex test class</li>
<li>3 visualforce pages</li>
<li>1 CSS file</li>
<li>A small amount of on-page javascript</li>
</ol>
<p><span id="more-228"></span><br />
Here is the custom extension:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">public class MyPropertyExtension {
&nbsp;
    //The standard controller on which this extension is based
    Property__c prop;
&nbsp;
    //Properties of this class
    public String market {get;set;}
    public String country {get;set;}
    List&lt;Market&gt; allMarkets = new List&lt;Market&gt;();
    Set&lt;String&gt; allCountries = new Set&lt;String&gt;();
&nbsp;
    //Contructor
    public MyPropertyExtension() {
        //set the default country
        country = 'United States';
&nbsp;
        //call the getAvailableMarketsAndCountries method to establish what markets actually have available properties
        getAvailableMarketsAndCountries();        
&nbsp;
        //on page load, get the market param from the URL and determine if it is a market that actually has available properties
        String marketParam = ApexPages.currentPage().getParameters().get('market');
        if(marketParam != ''){
            for(Market mk : allMarkets){
                if(mk.Name == marketParam){
                    //if the market is in the list of markets with available properties, set the 'country' variable to that markets associated country
                    country = mk.Country;
                    market = mk.Name;
                }
            }
&nbsp;
        }  
    }
&nbsp;
    //Constructor  
    public MyPropertyExtension(ApexPages.StandardController PropertyController) {
        this.prop = (Property__c)PropertyController.getRecord();
    }
&nbsp;
    //Constructor for test methods
    public MyPropertyExtension(Property__c testProp){
        this.prop = testProp;
    }    
&nbsp;
    //Used on the locator details page to list out all related Suite__c child objects where Record Type = TKD
    public List&lt;Suite__c&gt; getTKDSuiteRecords() {
         return [Select Name, Status__c, Property__c, Total_Raised_Floor_sqft__c, KVA__c, kW_of_UPS__c, (Select Id, Type__C From Spec_Sheets__r sp WHERE (sp.Marketing_Approved__c = TRUE) AND (sp.Type__c = 'Turn-Key Datacenter') LIMIT 1), (Select Id, Title, Type__c From Content__r cv WHERE (cv.IsLatest = TRUE) AND (cv.Type__c = 'Spec Sheet') LIMIT 1) from Suite__c s Where (s.Status__c = 'Available') AND (s.Property__c =:ApexPages.currentPage().getParameters().get('id')) AND (Total_Raised_Floor_sqft__c &gt; 1) AND (Available_PDU_Capacity_kW__c != null) AND (RecordTypeID = '012800000006Kgh') ORDER BY Total_Raised_Floor_sqft__c DESC];
    }
&nbsp;
    //Used on the locator details page to list out all related Suite__c child objects where Record Type = Datacenter
    public List&lt;Suite__c&gt; getDatacenterSuiteRecords() {
         return [Select Name, Status__c, Property__c, Total_Raised_Floor_sqft__c, KVA__c, kW_of_UPS__c, (Select Id, Type__C From Spec_Sheets__r sp WHERE sp.Marketing_Approved__c = TRUE LIMIT 1), (Select Id, Title, Type__c From Content__r cv WHERE (cv.IsLatest = TRUE) AND (cv.Type__c = 'Spec Sheet') LIMIT 1) from Suite__c s Where (s.Status__c = 'Available') AND (s.Property__c =:ApexPages.currentPage().getParameters().get('id')) AND (Total_Raised_Floor_sqft__c &gt; 1) AND (Available_PDU_Capacity_kW__c != null) AND (RecordTypeID = '012800000006Kgi') ORDER BY Total_Raised_Floor_sqft__c DESC];
    }    
&nbsp;
    //Used on the locator details page to list out all related Suite__c child objects where Record Type = PBB
    public List&lt;Suite__c&gt; getPBBSuiteRecords() {
         return [Select Name, Status__c, Property__c, Total_Rentable_sqft__c, (Select Id, Type__C From Spec_Sheets__r sp WHERE (sp.Marketing_Approved__c = TRUE) AND (sp.Type__c = 'Powered Base Building') LIMIT 1), (Select Id, Title, Type__c From Content__r cv WHERE (cv.IsLatest = TRUE) AND (cv.Type__c = 'Spec Sheet') LIMIT 1) from Suite__c s Where (s.Status__c = 'Available') AND (s.Property__c =:ApexPages.currentPage().getParameters().get('id')) AND (Total_Rentable_sqft__c &gt; 0) AND (RecordTypeID = '012800000006LIm') ORDER BY Total_Rentable_sqft__c DESC];
    }    
&nbsp;
    //Used on the locator details page to list out all related Spec_Sheet__c child objects    
    public List&lt;Spec_Sheet__c&gt; getSpecSheets() {
         return [Select s.id, s.Name, s.Property__c, s.Suite__c, s.Suite__r.Name from Spec_Sheet__c s Where (s.Suite__r.Status__c = 'Available') AND (s.Property__c =:ApexPages.currentPage().getParameters().get('id'))];         
    } 
&nbsp;
    //Used on the locator listings page to list out all Property__c records for a specific market
    public List&lt;Property__c&gt; getProperties() {
        return [Select p.id, p.Name, p.Description__c, p.PBB_Status__c, p.TKD_Available_Raised__c, p.Total_sq_ft__c, p.Datacenter_Park__c, p.Market__c, p.Marketing_Description__c, p.Zip_Postal_Code__c, p.State__c, p.Address__c, p.City__c, p.Total_kW__c, p.Marketing_Image1__c, p.Leasing_Status__c from Property__c p where (p.Active__c = TRUE) AND (p.Leasing_Status__c = 'Available') AND (p.Market__c = :market) Order By p.Name Asc];
    }
&nbsp;
    //Used on the locator details page to find any Content that relates to the property on screen
    public List&lt;ContentVersion&gt; getContentVersions() {
        return [select id, Title, Type__c, Suite__r.Name from ContentVersion cv Where (cv.Type__c = 'Spec Sheet') AND (cv.IsLatest = true) AND (cv.Suite__r.Status__c = 'Available') AND (cv.Property__r.Leasing_Status__c = 'Available') AND (cv.Property__c =:ApexPages.currentPage().getParameters().get('id'))];
    }    
&nbsp;
    //Used on the locator listings page to list out all Property__c records for a specific market
    public List&lt;Property__c&gt; getAllProperties() {
        String countryParam = ApexPages.currentPage().getParameters().get('country');
        if(countryParam == 'US'){
            return [Select p.id, p.Name, p.Address__c, p.City__c, p.Total_kW__c, p.Marketing_Image1__c, p.Marketing_Thumb__c, p.Leasing_Status__c, p.Market__c, p.Country__c, p.State__c from Property__c p where (p.Active__c = TRUE) AND (p.Country__c = 'United States' OR p.Country__c = 'Canada')Order By p.Market__c Asc];
        }else if(countryParam == 'EU'){
            return [Select p.id, p.Name, p.Address__c, p.City__c, p.Total_kW__c, p.Marketing_Image1__c, p.Marketing_Thumb__c, p.Leasing_Status__c, p.Market__c, p.Country__c, p.State__c from Property__c p where (p.Active__c = TRUE) AND (p.Country__c != 'United States' AND p.Country__c != 'Canada')Order By p.Market__c Asc];
        }else if(countryParam == 'test'){
            return [Select p.id, p.Name, p.Address__c, p.City__c, p.Total_kW__c, p.Marketing_Image1__c, p.Marketing_Thumb__c, p.Leasing_Status__c, p.Market__c, p.Country__c, p.State__c from Property__c p where (p.Active__c = TRUE) AND (p.Country__c = 'test') Order By p.Market__c Asc];
        }else{
            return [Select p.id, p.Name, p.Address__c, p.City__c, p.Total_kW__c, p.Marketing_Image1__c, p.Marketing_Thumb__c, p.Leasing_Status__c, p.Market__c, p.Country__c, p.State__c from Property__c p where (p.Active__c = TRUE) Order By p.Market__c Asc];
        }
    } 
&nbsp;
    //Used on the home page to list out all Property__c records where 'Featured' = TRUE
    public List&lt;Property__c&gt; getFeaturedProperties() {
        // Capture the 'testParam' querystring from the URL
        String testParam = ApexPages.currentPage().getParameters().get('test');
        // If testParam = 'test', that means a method from the test class is calling this production method.
        if (testParam == 'test'){
            return [Select p.id, p.Name, p.Featured__c, p.Market__c, p.Marketing_Image1__c from Property__c p where (p.Name = 'test') AND (p.Active__c = TRUE) AND (p.Leasing_Status__c = 'Available') AND (p.Featured__c = TRUE) Order By p.Market__c Asc];
        }else{
            return [Select p.id, p.Name, p.Featured__c, p.Market__c, p.Marketing_Image1__c from Property__c p where (p.Active__c = TRUE) AND (p.Leasing_Status__c = 'Available') AND (p.Featured__c = TRUE) Order By p.Market__c Asc];
        }
    }    
&nbsp;
    //Used to query the db and get back ONLY the market and country value for available properties
    public void getAvailableMarketsAndCountries() {
        AggregateResult[] groupResult = [Select p.Market__c, p.Country__c 
            from Property__c p 
            where (p.Active__c = TRUE) AND (p.Leasing_Status__c = 'Available') AND (p.Market__c != null) AND (p.Country__c != null)
            GROUP BY p.Market__c, p.Country__c 
            Order By p.Country__c Asc, p.Market__c Asc];
        for(AggregateResult ar : groupResult){             
            allMarkets.add(new Market(
                String.valueOf(ar.get('market__c')), 
                String.valueOf(ar.get('country__c'))
                )
            );
&nbsp;
            //Add country to set
            allCountries.add(String.valueOf(ar.get('country__c')));
&nbsp;
            System.Debug('NEW MARKET: ' + String.valueOf(ar.get('market__c')) + ', ' + String.valueOf(ar.get('Country__c')) + ';');
        }
    }
&nbsp;
    public SelectOption[] getMarketSelectList(){
        SelectOption[] marketsList = new SelectOption[]{};
        marketsList.add(new SelectOption('', '-- Select Market --'));
&nbsp;
        for(Market mk : allMarkets){
            if(mk.country == country){
                marketsList.add(mk.getSelectOption());
            }
        }
        return marketsList;
    }
&nbsp;
    public SelectOption[] getCountriesSelectList() {  
        SelectOption[] countriesList = new SelectOption[]{};     
&nbsp;
        for(String cntry : allCountries){
            countriesList.add(new SelectOption(cntry, cntry));
        } 
&nbsp;
        return countriesList;
    }       
&nbsp;
    //a sub class    
    class Market{
&nbsp;
        //properties for this sub class
        Public String name;
        Public String country;
&nbsp;
        public Market(String name, String country ){
            this.name = name;
            this.country = country;
        }
&nbsp;
        //
        public SelectOption getSelectOption(){
            return new SelectOption(name, name);
        }
    }      
}</pre></td></tr></table></div>

<p>Here is the apex test class:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">@isTest
private class TestMyPropertyExtension {
&nbsp;
        private final Property__c prop;
&nbsp;
        public TestMyPropertyExtension(ApexPages.StandardController PropertyController) {
            this.prop = (Property__c)PropertyController.getRecord();
        }        
&nbsp;
        static testmethod void testGetTKDSuitesPositive(){
&nbsp;
            // Create dummy data for test purposes.
            // Always assume your org has no data because the record may not be there later.    
            Property__c p = new Property__c();
            p.Name = 'foo';
            p.Region__c = 'Central';
            p.Market__c = 'Dallas';
            P.Leasing_Status__c = 'Available';
            System.debug('Inserting the test property record...');
            insert p;
&nbsp;
            Suite__c sAvailable = new Suite__c();
            sAvailable.Name ='bar';
            sAvailable.Property__c = p.Id;
            sAvailable.Status__C = 'Available';
            sAvailable.Total_Raised_Floor_sqft__c = 10000;
            sAvailable.Available_PDU_Capacity_kW__c = '1125';
            sAvailable.RecordTypeID = '012800000006Kgh';
            System.debug('Inserting the test TKD suite record with status = Available...');
            insert sAvailable;
            System.AssertEquals(sAvailable.Property__c, p.Id);
&nbsp;
            Suite__c sLeased = new Suite__c();
            sLeased.Name ='bar';
            sLeased.Property__c = p.Id;
            sLeased.Status__c = 'Leased';
            System.debug('Inserting the test suite record with status = Leased...');        
            insert sLeased;
&nbsp;
            // Use the vf page in my org named 'locatorDetails'
            PageReference pageRef = Page.locatorDetails;
            Test.setCurrentPage(pageRef);
&nbsp;
            // Set the id of the current vf page to a Property__c record that I know has child Suite__c and Spec_Sheet__c records
            ApexPages.currentPage().getParameters().put('id', p.Id);
            MyPropertyExtension controller = new MyPropertyExtension(p);
&nbsp;
            //Call controller.suiteRecords() and assert the list contains the expected records.
            List&lt;Suite__c&gt; suiteRecords = controller.getTKDSuiteRecords();
&nbsp;
            system.assertEquals(suiteRecords.size(),1);
&nbsp;
                for(Suite__c s: suiteRecords)
                {
                    System.assertEquals('Available', s.Status__c);
                    System.assertEquals(sAvailable.Id, s.Id);
                }
        }
&nbsp;
        static testmethod void testGetPBBSuitesPositive(){
&nbsp;
            // Create dummy data for test purposes.
            // Always assume your org has no data because the record may not be there later.    
            Property__c p = new Property__c();
            p.Name = 'foo';
            p.Region__c = 'Central';
            p.Market__c = 'Dallas';
            P.Leasing_Status__c = 'Available';
            System.debug('Inserting the test property record...');
            insert p;
&nbsp;
            Suite__c sAvailable = new Suite__c();
            sAvailable.Name ='bar';
            sAvailable.Property__c = p.Id;
            sAvailable.Status__C = 'Available';
            sAvailable.Total_Rentable_sqft__c = 10000;
            sAvailable.RecordTypeID = '012800000006LIm';            
            System.debug('Inserting the test PBB suite record with status = Available...');
            insert sAvailable;
            System.AssertEquals(sAvailable.Property__c, p.Id);
&nbsp;
            Suite__c sLeased = new Suite__c();
            sLeased.Name ='bar';
            sLeased.Property__c = p.Id;
            sLeased.Status__c = 'Leased';
            System.debug('Inserting the test suite record with status = Leased...');        
            insert sLeased;
&nbsp;
            // Use the vf page in my org named 'locatorDetails'
            PageReference pageRef = Page.locatorDetails;
            Test.setCurrentPage(pageRef);
&nbsp;
            // Set the id of the current vf page to a Property__c record that I know has child Suite__c and Spec_Sheet__c records
            ApexPages.currentPage().getParameters().put('id', p.Id);
            MyPropertyExtension controller = new MyPropertyExtension(p);
&nbsp;
            //Call controller.suiteRecords() and assert the list contains the expected records.
            List&lt;Suite__c&gt; suiteRecords = controller.getPBBSuiteRecords();
&nbsp;
            system.assertEquals(suiteRecords.size(),1);
&nbsp;
                for(Suite__c s: suiteRecords)
                {
                    System.assertEquals('Available', s.Status__c);
                    System.assertEquals(sAvailable.Id, s.Id);
                }
        }        
&nbsp;
        static testmethod void testGetDatacenterSuitesPositive(){
&nbsp;
            // Create dummy data for test purposes.
            // Always assume your org has no data because the record may not be there later.    
            Property__c p = new Property__c();
            p.Name = 'foo';
            p.Region__c = 'Central';
            p.Market__c = 'Dallas';
            P.Leasing_Status__c = 'Available';
            System.debug('Inserting the test property record...');
            insert p;
&nbsp;
            Suite__c sAvailable = new Suite__c();
            sAvailable.Name ='bar';
            sAvailable.Property__c = p.Id;
            sAvailable.Status__C = 'Available';
            sAvailable.Total_Raised_Floor_sqft__c = 10000;
            sAvailable.Available_PDU_Capacity_kW__c = '1125';
            sAvailable.RecordTypeID = '012800000006Kgi';            
            System.debug('Inserting the test Datacenter suite record with status = Available...');
            insert sAvailable;
            System.AssertEquals(sAvailable.Property__c, p.Id);
&nbsp;
            Suite__c sLeased = new Suite__c();
            sLeased.Name ='bar';
            sLeased.Property__c = p.Id;
            sLeased.Status__c = 'Leased';
            System.debug('Inserting the test suite record with status = Leased...');        
            insert sLeased;
&nbsp;
            // Use the vf page in my org named 'locatorDetails'
            PageReference pageRef = Page.locatorDetails;
            Test.setCurrentPage(pageRef);
&nbsp;
            // Set the id of the current vf page to a Property__c record that I know has child Suite__c and Spec_Sheet__c records
            ApexPages.currentPage().getParameters().put('id', p.Id);
            MyPropertyExtension controller = new MyPropertyExtension(p);
&nbsp;
            //Call controller.getDatacenterSuiteRecords() and assert the list contains the expected records.
            List&lt;Suite__c&gt; suiteRecords = controller.getDatacenterSuiteRecords();
&nbsp;
            system.assertEquals(suiteRecords.size(),1);
&nbsp;
                for(Suite__c s: suiteRecords)
                {
                    System.assertEquals('Available', s.Status__c);
                    System.assertEquals(sAvailable.Id, s.Id);
                }
        }        
&nbsp;
&nbsp;
        static testmethod void testGetSpecSheetsPositive(){
&nbsp;
            // Create dummy data for test purposes.
            // Always assume your org has no data because the record may not be there later.    
            Property__c p = new Property__c();
            p.Name = 'foo';
            insert p;
&nbsp;
            Suite__c sAvailable = new Suite__c();
            sAvailable.Name ='bar';
            sAvailable.Property__c = p.Id;
            sAvailable.Status__C = 'Available';
            insert sAvailable;
&nbsp;
            Spec_Sheet__c spec = new Spec_Sheet__c();
            spec.Name ='bar';
            spec.Property__c = p.Id;
            spec.Suite__c = sAvailable.Id;
            insert spec;
&nbsp;
            // Use the vf page in my org named 'locatorDetails'
            PageReference pageRef = Page.LocatorDetails;
            Test.setCurrentPage(pageRef);
&nbsp;
            // Set the id of the current vf page to a Property__c record that I know has child Suite__c and Spec_Sheet__c records
            ApexPages.currentPage().getParameters().put('id', p.Id);
            MyPropertyExtension controller = new MyPropertyExtension(p);
&nbsp;
            //Call controller.getSpecSheetLookup() and assert the list contains the expected records.
            List&lt;Spec_Sheet__c&gt; specRecords = controller.getSpecSheets();
                system.assertEquals(specRecords.size(),1);
        }
&nbsp;
        static testmethod void testGetFeatureProperties(){
&nbsp;
            // Create dummy data for test purposes.
            // Always assume your org has no data because the record may not be there later.    
            Property__c p = new Property__c();
            // The Property name MUST = 'test' so that the production method works correctly
            p.Name = 'test';
            p.Active__c = TRUE;
            p.Leasing_Status__c = 'Available';
            p.Market__c = 'Dallas';
            p.Featured__c = TRUE;
            insert p;
&nbsp;
            Property__c n = new Property__c();
            // The Property name MUST = 'test' so that the production method works correctly
            n.Name = 'test';
            n.Active__c = TRUE;
            n.Leasing_Status__c = 'Available';
            n.Market__c = 'Dallas';            
            n.Featured__c = FALSE;
            insert n;            
&nbsp;
            // Use the vf page in my org named 'locatorDetails'
            PageReference pageRef = Page.FeaturedProperties;
            Test.setCurrentPage(pageRef);
&nbsp;
            // Tell the production method this is a test and then call the constructor of my controller
            ApexPages.currentPage().getParameters().put('test', 'test');
            MyPropertyExtension controller = new MyPropertyExtension(p);
&nbsp;
            //Call controller.getFeaturedProperties() and assert the list contains the expected records.
            List&lt;Property__c&gt; propRecords = controller.getFeaturedProperties();
                system.assertEquals(propRecords.size(),1);
        }
&nbsp;
        static testmethod void testMarketSelectListPositive(){
&nbsp;
            Property__c prop1 = new Property__c();
                prop1.name = 'foo';
                prop1.market__c = 'test';
                prop1.country__c = 'United States';
                insert prop1;
&nbsp;
            PageReference pageRef = Page.LocatorListing;
            Test.setCurrentPage(pageRef);
&nbsp;
            ApexPages.currentPage().getParameters().put('market', prop1.market__c);
&nbsp;
            MyPropertyExtension controller = new MyPropertyExtension();
&nbsp;
            List&lt;SelectOption&gt; marketList = controller.getMarketSelectList();        
                system.assert(marketList.size() &gt; 1);
&nbsp;
            List&lt;SelectOption&gt; countryList = controller.getCountriesSelectList();
                system.assert(countryList.size() &gt; 1);
        }        
&nbsp;
        static testmethod void testGetAllPropertiesPositive(){
&nbsp;
            Property__c p = new Property__c();
                p.name = 'foo';
                p.Market__c = 'm1';
                p.Country__c = 'test';
                p.Active__c = true;
                insert p;
&nbsp;
            // Use the vf page in my org named 'LocatorListing'
            PageReference pageRef = Page.LocatorListing;
            Test.setCurrentPage(pageRef);
&nbsp;
            // Set the market param of the current vf page to the market in my test Property
            ApexPages.currentPage().getParameters().put('country', p.Country__c);
            MyPropertyExtension controller = new MyPropertyExtension();
&nbsp;
            //Call controller.getProperties() and assert the list contains the expected records.
            List&lt;Property__c&gt; propRecords = controller.getAllProperties();
                system.assertEquals(propRecords.size(),1);
        }
}</pre></td></tr></table></div>

<p>Here is the first visualforce page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page showHeader=&quot;false&quot; id=&quot;body&quot; standardStylesheets=&quot;false&quot; controller=&quot;MyPropertyExtension&quot; cache=&quot;true&quot; expires=&quot;600&quot;&gt;
&lt;head&gt;
&lt;title&gt;Digital Realty Trust - Data Center Search&lt;/title&gt;
&lt;meta name=&quot;google-site-verification&quot; content=&quot;mCvp2dIWyp5uuTK4H0mXzHBRdJDwTBLYQkJbBSMlU1I&quot; /&gt;
&lt;/head&gt;
&lt;div id=&quot;main&quot;&gt;
  &lt;apex:insert name=&quot;header&quot;&gt;
    &lt;c:LocatorHeader /&gt;
  &lt;/apex:insert&gt;
&nbsp;
&lt;!-- ========================== CONTAINER CLASSES ======================== --&gt; 
&lt;div class=&quot;main_text&quot; style=&quot;margin-top:15px;&quot;&gt;&lt;div class=&quot;locator_top&quot;&gt;&lt;h4&gt;Digital Realty Trust Data Centers&lt;/h4&gt;&lt;/div&gt;&lt;div class=&quot;center_content_bg_graytop&quot;&gt; &lt;div class=&quot;center_content&quot;&gt;   
&lt;!-- ===================================================================== --&gt;            
    &lt;br/&gt;
    &lt;h3&gt;We Know Datacenters&lt;/h3&gt;&lt;br/&gt;
    &lt;p style=&quot;width:95%;&quot;&gt;Digital Realty Trust provides flexible, reliable and cost-effective data center solutions. Through our suite of product offerings and unique leasing programs, our domestic and international properties are able to support even your most robust data center applications within your budget.&lt;/p&gt;&lt;br/&gt;
    &lt;p&gt;&lt;a href=&quot;http://datacenters.digitalrealtytrust.com/LocatorListing&quot;&gt;&lt;span class=&quot;filter&quot;&gt;Filter by Market&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
    &lt;apex:outputPanel id=&quot;list&quot;&gt;
        &lt;apex:dataTable value=&quot;{!allproperties}&quot; var=&quot;prop&quot; id=&quot;propList&quot; rowClasses=&quot;odd,even&quot; columnClasses=&quot;middle&quot; columnsWidth=&quot;108px, 250px, 160px, 160px, 160px&quot; styleClass=&quot;datacenterTable&quot;&gt;
            &lt;apex:column &gt;
                &lt;div style=&quot;border: 2px solid #e2e2e2; margin:0; padding:2px;&quot;&gt;&lt;a href=&quot;LocatorDetails?id={!prop.id}&quot; style=&quot;text-decoration:underline;&quot;&gt;&lt;apex:image alt=&quot;{!prop.Name}&quot; url=&quot;{!prop.Marketing_Thumb__c}&quot; width=&quot;100&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
            &lt;/apex:column&gt;
            &lt;apex:column &gt;
                &lt;apex:facet name=&quot;header&quot;&gt;Name&lt;/apex:facet&gt;
                &lt;apex:outputText value=&quot;{!prop.Address__c}&quot;/&gt;
            &lt;/apex:column&gt;
            &lt;apex:column &gt;
                &lt;apex:facet name=&quot;header&quot;&gt;Market&lt;/apex:facet&gt;
                &lt;apex:outputText value=&quot;{!prop.Market__c}&quot;/&gt;
            &lt;/apex:column&gt;            
            &lt;apex:column &gt;
                &lt;apex:facet name=&quot;header&quot;&gt;Country&lt;/apex:facet&gt;
                &lt;apex:outputText value=&quot;{!prop.Country__c}&quot;/&gt;
            &lt;/apex:column&gt;
            &lt;apex:column &gt;
                &lt;apex:facet name=&quot;header&quot;&gt;Status&lt;/apex:facet&gt;
                &lt;apex:outputText value=&quot;{!prop.Leasing_Status__c}&quot;/&gt;
            &lt;/apex:column&gt;           
        &lt;/apex:dataTable&gt;
    &lt;/apex:outputPanel&gt;
&nbsp;
&lt;!-- ===================================================================== --&gt;            
&lt;/div&gt; &lt;!--center_content--&gt;&lt;/div&gt; &lt;!--center_content_bg--&gt;&lt;div class=&quot;bottom&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;!--main_text--&gt; 
&lt;!-- ===================================================================== --&gt;   
&nbsp;
  &lt;apex:insert name=&quot;footer&quot;&gt;
    &lt;c:LocatorFooter /&gt;
  &lt;/apex:insert&gt;
&lt;/div&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is the second visualforce page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page showHeader=&quot;false&quot; id=&quot;body&quot; standardStylesheets=&quot;false&quot; controller=&quot;MyPropertyExtension&quot; apiVersion=&quot;19&quot; cache=&quot;true&quot; expires=&quot;600&quot;&gt;
&lt;head&gt;
&lt;title&gt;{!market} Data Center Solutions - Make a Smart Business Decision Today!&lt;/title&gt;
&lt;meta name=&quot;description&quot; content=&quot;Cost efficient {!market} data center solutions from Digital Realty Trust. We set up your business with an {!market} data center &amp; even provide support after you move in!&quot;/&gt;
&lt;meta name=&quot;keywords&quot; content=&quot;{!market} datacenter, data centers {!market}, {!market} datacenter properties,  Digital Realty Trust,  {!market}datacenter solutions, datacenter location {!market}, datacenter design, datacenter construction,  wholesale datacenter provider, datacenter leasing&quot; /&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
    $(&quot;select&quot;).change(function() {
          $(&quot;p.swapout&quot;).replaceWith(&quot;&lt;p&gt;Digital Realty Trust is the world’s largest wholesale datacenter provider. Our datacenter properties feature the power and connectivity capacity required to support your most arduous requirements. Every one of our datacenter properties offers you the maximum level of product flexibility to accommodate the unique needs of your organization and are designed for the most energy efficient level of operation possible. To learn more about our datacenters click on one of the building photographs below.&lt;/p&gt;&quot;);
          $(&quot;h1.swapout&quot;).replaceWith(&quot;&lt;h1&gt;Available Properties&lt;/h1&gt;&quot;);
          $(&quot;h2.swapout&quot;).replaceWith(&quot;&lt;h2&gt;Datacenter Property Portfolio&lt;/h2&gt;&quot;);
});});
&lt;/script&gt;
&nbsp;
&lt;/head&gt;
&lt;apex:includeScript value=&quot;{!URLFOR($Resource.Locator, 'jquery.min.js')}&quot;/&gt;
&lt;apex:includeScript value=&quot;{!URLFOR($Resource.Locator, 'popupmenu.js')}&quot;/&gt;
&lt;div id=&quot;main&quot;&gt;
  &lt;apex:insert name=&quot;header&quot;&gt;
    &lt;c:LocatorHeader /&gt;
  &lt;/apex:insert&gt;
&nbsp;
&nbsp;
&lt;!-- ========================== CONTAINER CLASSES ======================== --&gt; 
&lt;div class=&quot;main_text&quot; style=&quot;margin-top:15px;&quot;&gt;&lt;div class=&quot;locator_top&quot;&gt;&lt;h1 class=&quot;swapout&quot;&gt;{!market} Data Center Solutions&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;center_content_bg_graytop&quot;&gt; &lt;div class=&quot;center_content&quot;&gt;   
&lt;!-- ===================================================================== --&gt;            
    &lt;br/&gt;
    &lt;h2 class=&quot;swapout&quot;&gt;{!market} Datacenter Property Portfolio&lt;/h2&gt;&lt;br/&gt;
    &lt;p class=&quot;swapout&quot; style=&quot;width:95%;&quot;&gt;Digital Realty Trust is the world’s largest wholesale datacenter provider. Our &lt;b&gt;{!market} datacenter&lt;/b&gt; properties feature the power and connectivity capacity required to support your most arduous requirements. Every one of our &lt;strong&gt;&lt;em&gt;{!market} datacenter properties&lt;/em&gt;&lt;/strong&gt; offers you the maximum level of product flexibility to accommodate the unique needs of your organization and are designed for the most energy efficient level of operation possible. To learn more about our {!market} datacenters click on one of the building photographs below.&lt;/p&gt;&lt;br/&gt;
&nbsp;
&nbsp;
&lt;apex:form id=&quot;form&quot;&gt;
    &lt;table cellpadding=&quot;0&quot; cellspacing=&quot;10&quot;&gt;
        &lt;tr&gt;       
            &lt;td&gt;
                &lt;apex:outputText &gt;Country:&amp;nbsp;&lt;/apex:outputText&gt;
                &lt;apex:selectList id=&quot;chooseCountry&quot; value=&quot;{!country}&quot; size=&quot;1&quot;&gt;
                    &lt;apex:selectOptions value=&quot;{!countriesSelectList}&quot;/&gt;
                    &lt;apex:actionSupport event=&quot;onchange&quot; reRender=&quot;marketList&quot; status=&quot;refreshStatus&quot;/&gt;      
                &lt;/apex:selectList&gt;
            &lt;/td&gt;
            &lt;td&gt;    
                &lt;apex:outputText &gt;Market:&amp;nbsp;&lt;/apex:outputText&gt;
                &lt;apex:outputpanel id=&quot;marketList&quot;&gt;
                    &lt;apex:selectList id=&quot;chooseMarket&quot; size=&quot;1&quot; value=&quot;{!market}&quot;&gt;
                    &lt;apex:selectOptions value=&quot;{!marketSelectList}&quot;/&gt;
                    &lt;apex:actionSupport event=&quot;onchange&quot; reRender=&quot;list&quot; status=&quot;refreshStatus&quot; oncomplete=&quot;reloadPopups();&quot; /&gt;
                &lt;/apex:selectList&gt;
                &lt;/apex:outputpanel&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;apex:actionStatus id=&quot;refreshStatus&quot; startText=&quot;(updating...)&quot; /&gt;
            &lt;/td&gt;             
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;br/&gt;
&nbsp;
    &lt;apex:outputPanel id=&quot;list&quot;&gt;
        &lt;apex:repeat value=&quot;{!properties}&quot; var=&quot;prop&quot; id=&quot;propList&quot;&gt;
            &lt;div style=&quot;float: left; padding:0; margin:0px 15px 15px 0px;&quot;&gt;                  
                        &lt;h4 align=&quot;center&quot;&gt;{!prop.Address__c}&lt;/h4&gt;
                        &lt;div style=&quot;border: 2px solid #e2e2e2; margin:0; padding:2px;&quot;&gt;
                            &lt;a data-popupmenu=&quot;menu{!prop.id}&quot; href=&quot;LocatorDetails?id={!prop.id}&quot;&gt;
                                &lt;img src=&quot;{!prop.Marketing_Image1__c}&quot; width=&quot;250&quot; height=&quot;200&quot; alt=&quot;{!prop.Market__c} Data Center: {!prop.Name}&quot;/&gt;
                            &lt;/a&gt;                        
                        &lt;/div&gt;        
                             &lt;!--Begin hover content--&gt;
                             &lt;div id=&quot;menu{!prop.id}&quot; style=&quot;width:325px;&quot;&gt;
                                    &lt;h3 align=&quot;center&quot;&gt;&lt;apex:outputText id=&quot;dataCenterParkTitle&quot; value=&quot;{!IF(prop.Datacenter_Park__c=TRUE,'Datacenter Park ','')}&quot; /&gt;&lt;apex:outputText id=&quot;dataCenterParkMarket&quot; value=&quot;{!IF(prop.Datacenter_Park__c=TRUE,prop.Market__c,'')}&quot; /&gt;&lt;/h3&gt;
                                    &lt;h3 align=&quot;center&quot;&gt;{!prop.Address__c}&lt;/h3&gt;
                                    &lt;br/&gt;
                                    &lt;p&gt;&lt;apex:outputField value=&quot;{!prop.Description__c}&quot;/&gt;&lt;/p&gt;
                                    &lt;br/&gt;
                                    &lt;p&gt;Address:&lt;br /&gt;
                                    &lt;apex:outputField value=&quot;{!prop.Address__c}&quot;/&gt;&lt;br/&gt;
                                    &lt;apex:outputField value=&quot;{!prop.City__c}&quot;/&gt;&amp;nbsp;&lt;apex:outputField value=&quot;{!prop.State__c}&quot;/&gt;&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!prop.Zip_Postal_Code__c}&quot;/&gt;&lt;/p&gt;
                                    &lt;br/&gt;
                                    &lt;span style=&quot;display:{!IF(prop.Total_sq_ft__c=&quot;&quot;,'none','block')};&quot;&gt;&lt;p&gt;Size:&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!prop.Total_sq_ft__c}&quot; /&gt;&amp;nbsp;sq ft&lt;/p&gt;&lt;/span&gt;
                                    &lt;span style=&quot;display:{!IF(prop.TKD_Available_Raised__c=0,'none','block')};&quot;&gt;&lt;p&gt;Available TKD Space:&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!prop.TKD_Available_Raised__c}&quot;/&gt;&amp;nbsp;sq ft&lt;/p&gt;&lt;/span&gt;
                                    &lt;span style=&quot;display:{!IF(prop.PBB_Status__c=&quot;&quot;,'none','block')};&quot;&gt;&lt;p&gt;&lt;a href=&quot;http://www.digitalrealtytrust.com/powered-base-building.aspx&quot;&gt;Powered Base Building&lt;/a&gt;:&amp;nbsp;&amp;nbsp;{!prop.PBB_Status__c}&lt;/p&gt;&lt;/span&gt;
                                    &lt;br/&gt;
                                    &lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;LocatorDetails?id={!prop.id}&quot; style=&quot;text-decoration:underline;&quot;&gt;More Details&lt;/a&gt;&lt;/p&gt;
                             &lt;/div&gt;
                             &lt;!--End hover content--&gt;
                &lt;/div&gt;
        &lt;/apex:repeat&gt;              
    &lt;/apex:outputPanel&gt;    
&lt;/apex:form&gt;
&lt;p class=&quot;clearfloat&quot; /&gt;
&lt;div style=&quot;display:block; text-align:center;&quot;&gt;
&lt;a href=&quot;datacenters&quot;&gt;&lt;div class=&quot;all_props&quot;&gt;&lt;/div&gt;&lt;/a&gt;
&lt;/div&gt;
&nbsp;
&lt;!-- ===================================================================== --&gt;            
&lt;/div&gt; &lt;!--center_content--&gt;&lt;/div&gt; &lt;!--center_content_bg--&gt;&lt;div class=&quot;bottom&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;!--main_text--&gt; 
&lt;!-- ===================================================================== --&gt;   
&nbsp;
  &lt;apex:insert name=&quot;footer&quot;&gt;
    &lt;c:LocatorFooter /&gt;
  &lt;/apex:insert&gt;
&lt;/div&gt;
&lt;site:previewAsAdmin /&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is the visualforce page that make the mouse-over pop up possible:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page showHeader=&quot;false&quot; id=&quot;body&quot; standardStylesheets=&quot;false&quot; standardController=&quot;Property__c&quot; extensions=&quot;MyPropertyExtension&quot;&gt;
&lt;apex:stylesheet value=&quot;{!URLFOR($Resource.Locator, 'style.css')}&quot;/&gt;
&lt;div id=&quot;main&quot; style=&quot;width:350px; height:450px; padding:5px; margin:0px;&quot;&gt;    
    &lt;h3 align=&quot;center&quot;&gt;&lt;apex:outputText id=&quot;dataCenterParkTitle&quot; value=&quot;{!IF(Property__c.Datacenter_Park__c=TRUE,'Datacenter Park','')}&quot; /&gt;&amp;nbsp;&lt;apex:outputText id=&quot;dataCenterParkMarket&quot; value=&quot;{!IF(Property__c.Datacenter_Park__c=TRUE,Property__c.Market__c,'')}&quot; /&gt;&lt;/h3&gt;       
    &lt;h3 align=&quot;center&quot;&gt;&lt;a href=&quot;LocatorDetails?id={!Property__c.id}&quot; style=&quot;text-decoration:underline;&quot; target=&quot;_blank&quot;&gt;{!Property__c.Address__c}&lt;/a&gt;&lt;/h3&gt;
    &lt;br /&gt;&lt;apex:outputField value=&quot;{!Property__c.Marketing_Description__c}&quot;/&gt;&lt;br /&gt;    
    &lt;br /&gt;Address:&amp;nbsp;&lt;a href=&quot;http://www.google.com/maps?&amp;q={!Property__c.Address__c}+{!Property__c.City__c}+{!Property__c.State__c}+{!Property__c.Zip_Postal_Code__c}&quot; style=&quot;text-decoration:underline;&quot; target=&quot;_blank&quot;&gt;map&lt;/a&gt;&lt;br/&gt;
    &lt;apex:outputField value=&quot;{!Property__c.Address__c}&quot;/&gt;&lt;br/&gt;
    &lt;apex:outputField value=&quot;{!Property__c.City__c}&quot;/&gt;,&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.State__c}&quot;/&gt;&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Zip_Postal_Code__c}&quot;/&gt;&lt;br/&gt;&lt;br/&gt;
    Size:&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Total_sq_ft__c}&quot;/&gt;&lt;br/&gt;
    Power:&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Total_kW__c}&quot;/&gt;&amp;nbsp;kW&lt;br/&gt;
    Available TKD Space:&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.TKD_Available_Raised__c}&quot;/&gt;&amp;nbsp;sq ft&lt;br/&gt;
    PBB:&amp;nbsp;&amp;nbsp;{!Property__c.PBB_Status__c}
    &lt;br/&gt;&lt;br /&gt;
    &lt;table border=&quot;0&quot; style=&quot;text-align:left;&quot; &gt;
        &lt;tr&gt;
            &lt;th&gt;Specification Sheets&lt;/th&gt;
        &lt;/tr&gt;
    &lt;apex:repeat var=&quot;specSheets&quot; value=&quot;{!Property__c.Spec_Sheets__r}&quot;&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;a href=&quot;http://info.digitalrealtytrust.com/SpecSheetRequest.html?pid={!specSheets.id}&quot; target=&quot;_blank&quot;&gt;{!specSheets.Name}&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/apex:repeat&gt;
    &lt;/table&gt;    
    &lt;br /&gt;&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;LocatorDetails?id={!Property__c.id}&quot; style=&quot;text-decoration:underline;&quot; target=&quot;_blank&quot;&gt;Details&lt;/a&gt;&lt;/p&gt;
&nbsp;
&lt;/div&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is the third visualforce page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;apex:page showHeader=&quot;false&quot; sidebar=&quot;false&quot; id=&quot;body&quot; standardStylesheets=&quot;false&quot; standardController=&quot;Property__c&quot; extensions=&quot;MyPropertyExtension&quot;&gt;
&lt;head&gt;
&lt;title&gt;{!Property__c.Market__c} Data Center: {!Property__c.Address__c}&lt;/title&gt;
&lt;apex:includeScript value=&quot;{!URLFOR($Resource.Locator, 'jquery.min.js')}&quot;/&gt;
&lt;/head&gt;
&lt;div id=&quot;main&quot;&gt;
  &lt;apex:insert name=&quot;header&quot;&gt;
    &lt;c:LocatorHeader /&gt;
  &lt;/apex:insert&gt;
&nbsp;
&lt;!-- ========================== CONTAINER CLASSES ======================== --&gt; 
&lt;div class=&quot;main_text&quot; style=&quot;margin-top:15px;&quot;&gt;&lt;div class=&quot;solutions_top&quot;&gt;&lt;h4&gt;&lt;apex:outputField value=&quot;{!Property__c.Market__c}&quot;/&gt;&amp;nbsp;Data Center:&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Address__c}&quot;/&gt;&lt;/h4&gt;&lt;div class=&quot;details_col_top&quot;&gt;&lt;h3&gt;&lt;apex:outputField value=&quot;{!Property__c.Market__c}&quot;/&gt;&amp;nbsp;Data Center&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;center_content_bg_graytop&quot;&gt; &lt;div class=&quot;center_content&quot;&gt;   
&lt;!-- ===================================================================== --&gt;  
&nbsp;
    &lt;!--Begin Column 1--&gt;
    &lt;div id=&quot;leftcol_details&quot;&gt;
        &lt;p class=&quot;breadcrumb&quot;&gt;&lt;a href=&quot;LocatorListing&quot;&gt;Data Center Locator &gt; &lt;/a&gt;&lt;a href=&quot;LocatorListing?market={!Property__c.Market__c}&quot;&gt;{!Property__c.Market__c}&lt;/a&gt;&lt;/p&gt;
        &lt;br/&gt;
        &lt;p style=&quot;width:95%;&quot;&gt;&lt;apex:outputField value=&quot;{!Property__c.Description__c}&quot;/&gt;
        &lt;br /&gt;&lt;br /&gt;
        &lt;a class=&quot;bridge-link&quot; href=&quot;http://www.digitalrealtytrust.com/form-content-request.aspx?property={!Property__c.Address__c}&quot;&gt;&lt;div class=&quot;more_info&quot;&gt;&lt;/div&gt;&lt;/a&gt;
        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   
        &lt;/p&gt;
        &lt;span style=&quot;display:{!IF(Property__c.Sales_Contact__c='','none','block')};&quot;&gt;&lt;h3 align=&quot;center&quot;&gt;For Leasing Information Call:&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Sales_Contact__c}&quot;/&gt;&lt;/h3&gt;&lt;/span&gt;
        &lt;br/&gt;
        &lt;div id=&quot;detailPhoto&quot; align=&quot;center&quot;&gt;&lt;img src=&quot;{!Property__c.Marketing_Image1__c}&quot; alt=&quot;{!Property__c.Market__c} Data Center: {!Property__c.Address__c}&quot; /&gt;&lt;/div&gt;
        &lt;p class=&quot;clearFloat&quot; /&gt;
        &lt;br/&gt;
        &lt;div style=&quot;display:{!IF(tkdsuiterecords.size=0,'none','block')};&quot;&gt;
            &lt;h5&gt;Available Turn-Key Datacenter&amp;reg; Space&lt;/h5&gt;
            &lt;apex:dataTable styleClass=&quot;detailsTable&quot; rendered=&quot;{!IF(tkdsuiterecords.size=0,'False','True')}&quot; value=&quot;{!tkdsuiterecords}&quot; var=&quot;tkd&quot; columns=&quot;4&quot; rowClasses=&quot;odd,even&quot; columnsWidth=&quot;100px,100px,100px,100px&quot; cellpadding=&quot;0px&quot; cellspacing=&quot;0px&quot;&gt;
                &lt;apex:column headerValue=&quot;Suite&quot;&gt;&lt;apex:outputText value=&quot;{!tkd.Name}&quot;/&gt;&lt;/apex:column&gt; 
                &lt;apex:column headerValue=&quot;Raised Floor&quot;&gt;
                    &lt;apex:outputText value=&quot;{0, number, integer}&quot;&gt;
                        &lt;apex:param value=&quot;{!tkd.Total_Raised_Floor_sqft__c}&quot;/&gt;
                    &lt;/apex:outputText&gt;
                &lt;/apex:column&gt;
                &lt;apex:column headerValue=&quot;Download&quot; &gt;&lt;apex:outputLink value=&quot;/sfc/servlet.shepherd/version/download/{!tkd.Content__r[0].Id}&quot; target=&quot;_document&quot; rendered=&quot;{!IF(tkd.Content__r.size=0,'False','True')}&quot;&gt;&lt;apex:image value=&quot;/resource/1301687211000/pdf_icon&quot;/&gt;&lt;/apex:outputLink&gt;&lt;/apex:column&gt;
                &lt;apex:column headerValue=&quot;Details&quot; rendered=&quot;false&quot;&gt;&lt;apex:outputLink value=&quot;LocatorSpecSheet?id={!tkd.Spec_Sheets__r[0].Id}&quot; rendered=&quot;{!IF(tkd.Spec_Sheets__r.size=0,'False','True')}&quot;&gt;&lt;apex:outputText value=&quot;View&quot;/&gt;&lt;/apex:outputLink&gt;&lt;/apex:column&gt;                 
            &lt;/apex:dataTable&gt;
        &lt;/div&gt;
        &lt;br/&gt;&lt;br/&gt;             
        &lt;div style=&quot;display:{!IF(pbbsuiterecords.size=0,'none','block')};&quot;&gt;
            &lt;h5&gt;Available Powered Base Building&amp;reg; Space&lt;/h5&gt;
            &lt;apex:dataTable styleClass=&quot;detailsTable&quot; rendered=&quot;{!IF(pbbsuiterecords.size=0,'False','True')}&quot; value=&quot;{!pbbsuiterecords}&quot; var=&quot;pbb&quot; columns=&quot;4&quot; rowClasses=&quot;odd,even&quot; columnsWidth=&quot;100px,100px,100px,100px&quot; cellpadding=&quot;0px&quot; cellspacing=&quot;0px&quot;&gt;
                &lt;apex:column headerValue=&quot;Suite&quot;&gt;&lt;apex:outputText value=&quot;{!pbb.Name}&quot;/&gt;&lt;/apex:column&gt; 
                &lt;apex:column headerValue=&quot;Total Rentable&quot;&gt;
                    &lt;apex:outputText value=&quot;{0, number, integer}&quot;&gt;
                        &lt;apex:param value=&quot;{!pbb.Total_Rentable_sqft__c}&quot; /&gt;
                    &lt;/apex:outputText&gt;
                &lt;/apex:column&gt;
                &lt;apex:column headerValue=&quot;Download&quot; &gt;&lt;apex:outputLink value=&quot;/sfc/servlet.shepherd/version/download/{!pbb.Content__r[0].Id}&quot; target=&quot;_document&quot; rendered=&quot;{!IF(pbb.Content__r.size=0,'False','True')}&quot;&gt;&lt;apex:image value=&quot;/resource/1301687211000/pdf_icon&quot;/&gt;&lt;/apex:outputLink&gt;&lt;/apex:column&gt;
                &lt;apex:column headerValue=&quot;Details&quot; rendered=&quot;false&quot;&gt;&lt;apex:outputLink value=&quot;LocatorSpecSheet?id={!pbb.Spec_Sheets__r[0].Id}&quot; rendered=&quot;{!IF(pbb.Spec_Sheets__r.size=0,'False','True')}&quot;&gt;&lt;apex:outputText value=&quot;View&quot;/&gt;&lt;/apex:outputLink&gt;&lt;/apex:column&gt; 
            &lt;/apex:dataTable&gt;            
        &lt;/div&gt;
        &lt;br/&gt;&lt;br/&gt;    
    &lt;/div&gt;
    &lt;!--End left column--&gt;
&nbsp;
    &lt;!--Begin right column--&gt;
        &lt;div id=&quot;rightcol_details&quot;&gt;       
            &lt;div id=&quot;detailFacts&quot;&gt;
                &lt;br/&gt;
                &lt;span class=&quot;fact&quot;&gt;&lt;apex:outputText id=&quot;leaseStatusLabel&quot; value=&quot;{!IF(Property__c.Leasing_Status__c!='','Leasing Status: ','')}&quot; /&gt;&amp;nbsp;&lt;apex:outputText id=&quot;leaseStatusValue&quot; value=&quot;{!Property__c.Leasing_Status__c}&quot; /&gt;&lt;/span&gt;
                &lt;span class=&quot;fact&quot; style=&quot;display:{!IF(Property__c.Total_sq_ft__c='','none','block')};&quot;&gt;Size:&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Total_sq_ft__c}&quot;/&gt;&amp;nbsp;sq ft&lt;/span&gt;
                &lt;!--&lt;span class=&quot;fact&quot; style=&quot;display:{!IF(Property__c.Year_Built__c='','none','block')};&quot;&gt;&lt;apex:outputText id=&quot;yearBuiltLabel&quot; value=&quot;{!IF(Property__c.Year_Built__c!='','Year Built: ','')}&quot; /&gt;&amp;nbsp;&lt;apex:outputText id=&quot;yearBuiltValue&quot; value=&quot;{!Property__c.Year_Built__c}&quot; /&gt;&lt;/span&gt;--&gt;
                &lt;!--&lt;span class=&quot;fact&quot; style=&quot;display:{!IF(Property__c.Year_Last_Renovated__c='','none','block')};&quot;&gt;&lt;apex:outputText id=&quot;yearRenoLabel&quot; value=&quot;{!IF(Property__c.Year_Last_Renovated__c!='','Year Last Renovated: ','')}&quot; /&gt;&amp;nbsp;&lt;apex:outputText id=&quot;yearRenoValue&quot; value=&quot;{!Property__c.Year_Last_Renovated__c}&quot; /&gt;&lt;/span&gt;--&gt;
                &lt;br/&gt;                
                &lt;div style=&quot;text-align:center; margin:20px 0px 10px 0px; display:{!IF(Property__c.Marketing_Video__c='','none','block')};&quot;&gt;
                &lt;span class=&quot;fact&quot;&gt;Property Overview&lt;/span&gt;
                &lt;apex:includeScript value=&quot;http://files.digitalrealtytrust.s3.amazonaws.com/mediaplayer/swfobject.js&quot;/&gt;
                    &lt;embed
                    type=&quot;application/x-shockwave-flash&quot;
                    id=&quot;player&quot;
                    name=&quot;player&quot;
                    src=&quot;http://files.digitalrealtytrust.s3.amazonaws.com/mediaplayer/player-licensed.swf&quot;
                    width=&quot;250&quot;            
                    height=&quot;200&quot;
                    bgcolor=&quot;#AEADAD&quot;
                    frontcolor=&quot;#AEADAD&quot;
                    allowscriptaccess=&quot;always&quot;
                    allowfullscreen=&quot;true&quot;
                    flashvars=&quot;streamer=rtmp://vid.digitalrealtytrust.com/cfx/st&amp;file=datacenters/{!Property__c.Marketing_Video__c}&amp;plugins=gapro-1&amp;gapro.accountid=UA-1231610-1&amp;gapro.trackstarts=true&amp;gapro.trackpercentage=true&amp;gapro.tracktime=true&quot;
                    /&gt;
                &lt;/div&gt;
                &lt;div style=&quot;text-align:center; margin:20px 0px 10px 0px; display:{!IF(Property__c.Marketing_Video_EU__c='','none','block')};&quot;&gt;
                &lt;span class=&quot;fact&quot;&gt;Property Overview (English)&lt;/span&gt;
                &lt;apex:includeScript value=&quot;http://files.digitalrealtytrust.s3.amazonaws.com/mediaplayer/swfobject.js&quot;/&gt;
                    &lt;embed
                    type=&quot;application/x-shockwave-flash&quot;
                    id=&quot;player&quot;
                    name=&quot;player&quot;
                    src=&quot;http://files.digitalrealtytrust.s3.amazonaws.com/mediaplayer/player-licensed.swf&quot;
                    width=&quot;250&quot;            
                    height=&quot;200&quot;
                    bgcolor=&quot;#AEADAD&quot;
                    frontcolor=&quot;#AEADAD&quot;
                    allowscriptaccess=&quot;always&quot;
                    allowfullscreen=&quot;true&quot;
                    flashvars=&quot;streamer=rtmp://vid.digitalrealtytrust.com/cfx/st&amp;file=datacenters/{!Property__c.Marketing_Video_EU__c}&amp;plugins=gapro-1&amp;gapro.accountid=UA-1231610-1&amp;gapro.trackstarts=true&amp;gapro.trackpercentage=true&amp;gapro.tracktime=true&quot;
                    /&gt;
                &lt;/div&gt;                
                &lt;div style=&quot;text-align:center; margin:20px 0px 10px 0px; display:{!IF(Property__c.Marketing_Video_FR__c='','none','block')};&quot;&gt;
                &lt;span class=&quot;fact&quot;&gt;Synthèse du Bâtiment (En Français)&lt;/span&gt;
                &lt;apex:includeScript value=&quot;http://files.digitalrealtytrust.s3.amazonaws.com/mediaplayer/swfobject.js&quot;/&gt;
                    &lt;embed
                    type=&quot;application/x-shockwave-flash&quot;
                    id=&quot;player&quot;
                    name=&quot;player&quot;
                    src=&quot;http://files.digitalrealtytrust.s3.amazonaws.com/mediaplayer/player-licensed.swf&quot;
                    width=&quot;250&quot;            
                    height=&quot;200&quot;
                    bgcolor=&quot;#AEADAD&quot;
                    frontcolor=&quot;#AEADAD&quot;
                    allowscriptaccess=&quot;always&quot;
                    allowfullscreen=&quot;true&quot;
                    flashvars=&quot;streamer=rtmp://vid.digitalrealtytrust.com/cfx/st&amp;file=datacenters/{!Property__c.Marketing_Video_FR__c}&amp;plugins=gapro-1&amp;gapro.accountid=UA-1231610-1&amp;gapro.trackstarts=true&amp;gapro.trackpercentage=true&amp;gapro.tracktime=true&quot;
                    /&gt;
                &lt;/div&gt;                           
                &lt;div style=&quot;display:{!IF(Property__c.Certification_Logo__c='','none','block')}; width:100px; height:100px; margin:5px; float:left; background:url({!Property__c.Certification_Logo__c}) no-repeat;&quot;&gt;&lt;apex:outputText value=&quot;{!IF(Property__c.Certification_Logo__c!='',' ','')}&quot; /&gt;&lt;/div&gt;
                &lt;div style=&quot;display:{!IF(Property__c.PUE_Score_Graphic__c='','none','block')}; width:138px; height:100px; margin:5px; float:left; background:url({!Property__c.PUE_Score_Graphic__c}) no-repeat;&quot;&gt;&lt;apex:outputText value=&quot;{!IF(Property__c.PUE_Score_Graphic__c!='',' ','')}&quot; /&gt;&lt;/div&gt;                    
            &lt;/div&gt;&lt;!--facts--&gt;
            &lt;p class=&quot;clearFloat&quot; /&gt;  
            &lt;!--Begin content table--&gt;
            &lt;div id=&quot;detailDownloads&quot; style=&quot;display:none;&quot;&gt;
            &lt;h3 class=&quot;rightcol_heading&quot;&gt;Data Center Details&lt;/h3&gt;
            &lt;br/&gt;
            &lt;p align=&quot;left&quot; style=&quot;padding-left:15px;&quot;&gt;Click to download:&lt;/p&gt;
            &lt;apex:dataTable var=&quot;cv&quot; value=&quot;{!contentVersions}&quot; id=&quot;contentTable&quot; align=&quot;center&quot;&gt;            
                &lt;apex:column width=&quot;400&quot;&gt;
                        &lt;apex:outputLink value=&quot;/sfc/servlet.shepherd/version/download/{!cv.Id}&quot; target=&quot;_blank&quot;&gt;Suite&amp;nbsp;&lt;apex:outputText value=&quot;{!cv.Suite__r.Name}&quot;/&gt;&amp;nbsp;&lt;apex:outputText value=&quot;{!cv.Type__c}&quot;/&gt;&lt;/apex:outputLink&gt;
                &lt;/apex:column&gt;            
            &lt;/apex:dataTable&gt;
            &lt;/div&gt;
            &lt;!--End content table--&gt;              
            &lt;div id=&quot;detailAddress&quot;&gt;
                &lt;h3 class=&quot;rightcol_heading&quot;&gt;Data Center Address&lt;/h3&gt;
                &lt;apex:outputField value=&quot;{!Property__c.Address__c}&quot;/&gt;&lt;br /&gt;
                &lt;apex:outputField value=&quot;{!Property__c.City__c}&quot;/&gt;&lt;apex:outputText value=&quot;{!IF(Property__c.Country__c='United States',&quot;,&quot;,'')}&quot; /&gt;&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.State__c}&quot;/&gt;&amp;nbsp;&amp;nbsp;&lt;apex:outputField value=&quot;{!Property__c.Zip_Postal_Code__c}&quot;/&gt;&lt;br /&gt;
                &lt;apex:outputField value=&quot;{!Property__c.Country__c}&quot;/&gt;&lt;br /&gt;
                &lt;span style=&quot;display:{!IF(Property__c.Sales_Contact__c='','none','block')};&quot;&gt;&lt;apex:outputField value=&quot;{!Property__c.Sales_Contact__c}&quot;/&gt;&lt;/span&gt;&lt;br/&gt;
                &lt;br/&gt;
                &lt;a href=&quot;http://maps.google.com/maps?&amp;q={!Property__c.lat__c},+{!Property__c.long__c}+({!Property__c.Address__c})+&amp;iwloc=A&amp;hl=en&quot; style=&quot;text-decoration:underline;font-size:9px;&quot; target=&quot;_blank&quot;&gt;&lt;apex:image alt=&quot;{!Property__c.Market__c} Data Center&quot; styleClass=&quot;detailMapPhoto&quot; value=&quot;http://maps.google.com/maps/api/staticmap?markers=color:blue|{!Property__c.lat__c},{!Property__c.long__c}&amp;size=220x200&amp;sensor=false&amp;key=ABQIAAAA2qmEZeiUTNuhcaLhcZC9TRSDf1o2ZIfH3wtGNAIGWlamHT2hrxSWrFXkl4QL05qnV3mVo61UosLXeQ&quot; /&gt;&lt;/a&gt;
                &lt;br/&gt;&lt;br/&gt;
            &lt;/div&gt;&lt;!--detailAddress--&gt;
        &lt;/div&gt;&lt;!--End right column--&gt;
&nbsp;
&nbsp;
&lt;!-- ===================================================================== --&gt;            
&lt;/div&gt; &lt;!--center_content--&gt;&lt;/div&gt; &lt;!--center_content_bg--&gt;&lt;div class=&quot;bottom&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;!--main_text--&gt; 
&lt;!-- ===================================================================== --&gt;   
&nbsp;
  &lt;apex:insert name=&quot;footer&quot;&gt;
    &lt;c:LocatorFooter /&gt;
  &lt;/apex:insert&gt;
&lt;/div&gt;
&lt;/apex:page&gt;</pre></td></tr></table></div>

<p>Here is the CSS file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">/*   -------- DATACENTER LOCATOR STYLES -------  */
&nbsp;
/* Styles for datacenters.digitalrealtytrust.com/LocatorListing */
.all_props { background:url(http://img.digitalrealtytrust.com/all_properties.png) bottom no-repeat; width:100%; height: 38px; margin-left:-5px; cursor:pointer; cursor:pointer; }
.all_props:hover { background:url(http://img.digitalrealtytrust.com/all_properties.png) top no-repeat; }
.jqpopupmenu, .jqpopupmenu ul{ /*topmost and sub ULs, respectively*/ font: normal 12px Verdana; margin: 0; padding: 8px; position: absolute; left: 0;  top: 0;list-style-type: none; background: white; border:1px solid #E2E2E2; visibility: hidden; display: none; /*collapse all sub menus to begin with*/ box-shadow: 3px 3px 8px #818181; /*shadow for CSS3 capable browsers.*/ -webkit-box-shadow: 3px 3px 8px #818181; -moz-box-shadow: 3px 3px 8px #818181; }
.jqpopupmenu li{ position: relative; }
.jqpopupmenu li a{ display: block; width: 210px; /*width of menu (not including side paddings)*/ height:60px; color:#676868; background: #F5F5F5; text-decoration: none; padding: 5px 10px; border-bottom:1px solid #E2E2E2; }
.jqpopupmenu li img{ float:left; width:60px; height:60px; margin-right:10px; }
* html .jqpopupmenu li{ /*IE6 CSS hack*/ display: inline-block; width: 230px; /*width of menu (include side paddings of LI A*/}
.jqpopupmenu li a:hover, .jqpopupmenu li.selected&gt;a{ background: #e0e0e0; }
.rightarrowclass{ position: absolute; top: 6px; right: 5px; }
&nbsp;
&nbsp;
/* Styles for datacenters.digitalrealtytrust.com/datacenters */
.datacenterTable{  }
.middle{ vertical-align:middle; text-align:center; margin:10px 0px 0px 0px; }
&nbsp;
&nbsp;
/* Styles for datacenters.digitalrealtytrust.com/LocatorDetails */
.breadcrumb{ font-size:9px; }
#leftcol_details{float:left; width:616px; padding-top:10px;}
div#leftcol_details ul{ padding-left:30px }
div#leftcol_details li{ list-style-type:square; margin:5px 0px; padding-left:5px; }
div#leftcol_details h3{ margin:5px 0px; display:block; }
.sfdc_richtext{ margin-bottom:20px; }
.odd{ background-color:#F8F8F8; margin:0; padding:0; }
.even{ margin:0; padding:0; background-color:#FFF; }
div#detailPhoto{ /*shadow for CSS3 capable browsers.*/ width:600px; box-shadow: 3px 3px 8px #818181; -webkit-box-shadow: 3px 3px 8px #818181; -moz-box-shadow: 3px 3px 8px #818181; }
.detailMapPhoto{ /*shadow for CSS3 capable browsers.*/ box-shadow: 3px 3px 8px #818181; -webkit-box-shadow: 3px 3px 8px #818181; -moz-box-shadow: 3px 3px 8px #818181; }
div#detailSuiteTable{ margin-top:20px; padding:0; text-align:center; }
.detailsTable { text-align:center; }
#rightcol_details{ float:right; height:100%; width:260px; background:#fafafa; margin-right:10px;}
div#detailFacts{ width:260px; display:inline; line-height:100%; padding-left:10px; }
.fact{ font-weight:bold; line-height:25px; display:block; padding-left:10px; }
div#detailsVideo { text-align:center; margin:20px 0px 10px 0px; }
div#detailsCertLogo { width:100px; height:100px; margin:5px; float:left; }
div#detailsPUELogo { width:138px; height:100px; margin:5px; float:left; }
div#detailDownloads{ width:260px; text-align:center; margin-top:120px; }
div#detailAddress{ width:260px; background: #ffffff url(http://img.digitalrealtytrust.com/solutions_bg.gif) top repeat-x; text-align:center; margin-top:120px; }
&nbsp;
&nbsp;
/*Styles for the &quot;more information&quot; form used on LocatorDetails and LocatorSpecSheet */
div#form form input { float:left; width:200px; }
div#form form select { float:left; width:200px; }
div#form form label { float:left; width:150px; }
div#form form li { float:right; clear:both; margin-top:10px; width:100%; }
div#form .mktField { list-style-type:none; }
div#form form textarea { width:200px; height:100px; }
div#form form span.mktFormMsg { color:red; font-size:9px; }
&nbsp;
/* Adjustments Taken from Style.css  */
.center_content_bg { float:left;background:url(http://img.digitalrealtytrust.com/sides.png) repeat-y;width:945px; padding-top:30px; }
.center_content_bg_graytop { float:left;background:url(http://img.digitalrealtytrust.com/sides.png) repeat-y;width:945px; }
.center_content { float:left;margin:0px 0px 0px 55px; }
.center_content p { width:70%; }
.locator_top { float:left;width:100%;height:50px;background:url(http://img.digitalrealtytrust.com/locator_top.png) no-repeat; }
.locator_top h3{ float:right; font-size:110%; color:white; font-weight:bold; padding:19px 50px 0px 0px; text-transform:uppercase; }
.locator_top h2{ float:left; color: #696969; font-size:150%; font-weight:normal; text-transform:uppercase; padding:17px 0px 10px 60px; }
.locator_top h4{ float:left; font-size:135%; color: #696969; font-weight:bold; padding:18px 0px 0px 60px; }
.locator_top h1{ float:left; color: #696969; font-size:150%; font-weight:normal; text-transform:uppercase; padding:17px 0px 10px 60px; }
.details_col_top{ float:right; margin-right:10px; width:265px; text-align:center; }
.details_col_top h3{ float:none; font-size:110%; color:white; font-weight:bold; padding:19px 0px 0px 0px; text-transform:uppercase; }
h3.rightcol_heading { background:#AEADAD; padding:15px 15px 15px 15px; font-size:120%; color:white; font-weight:bold; text-transform:uppercase; margin-bottom:10px; }
.filter{ border:solid #cccccc 1px; padding:7px 17px; background:white; font-weight:bold; }</pre></td></tr></table></div>

<p><a href="http://shawnfranklin.com/example-force-com-site-apex-and-visualforce/">Example Force.com Site Apex and Visualforce</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/example-force-com-site-apex-and-visualforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Salesforce.com Developer Profile</title>
		<link>http://shawnfranklin.com/new-salesforce-com-developer-profile/</link>
		<comments>http://shawnfranklin.com/new-salesforce-com-developer-profile/#comments</comments>
		<pubDate>Thu, 19 May 2011 14:58:11 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Resume]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/2011/05/new-salesforce-com-developer-profile/</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Here is a link to my Salesforce.com Developer Profile. I really like what SFDC is doing here. This really allows me to &#8220;show off&#8221; in an environment where others can find me easily. Kudos.</p></p><p><a href="http://shawnfranklin.com/new-salesforce-com-developer-profile/">New Salesforce.com Developer Profile</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Here is a link to my <a target="_blank" href="https://sites.secure.force.com/appexchange/profile?u=00530000003TSXCAA4">Salesforce.com Developer Profile</a>.</p>
<p>I really like what SFDC is doing here. This really allows me to &#8220;show off&#8221; in an environment where others can find me easily. Kudos.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=0888495e-b56c-8db8-bee7-b175743e29e4" /></div>
<p><a href="http://shawnfranklin.com/new-salesforce-com-developer-profile/">New Salesforce.com Developer Profile</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/new-salesforce-com-developer-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I was a PC. Now I&#8217;m a Mac.</title>
		<link>http://shawnfranklin.com/i-was-a-pc-now-im-a-mac/</link>
		<comments>http://shawnfranklin.com/i-was-a-pc-now-im-a-mac/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 21:45:16 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Hobby]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/?p=183</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>After more than a year of evaluating, debating, discussing with friends and colleagues, I bought my first Mac &#8211; a MacBook Air. I must say, I love it already!</p></p><p><a href="http://shawnfranklin.com/i-was-a-pc-now-im-a-mac/">I was a PC. Now I&#8217;m a Mac.</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>After more than a year of evaluating, debating, discussing with friends and colleagues, I bought my first Mac &#8211; a MacBook Air. I must say, I love it already!<br />
<div id="attachment_184" class="wp-caption aligncenter" style="width: 234px"><a href="http://shawnfranklin.com/wp-content/uploads/2011/03/photo-e13002253316111.jpg"><img src="http://shawnfranklin.com/wp-content/uploads/2011/03/photo-e13002253316111-224x300.jpg" alt="I was a PC. Now I&#039;m a Mac." title="I was a PC. Now I a Mac." width="224" height="300" class="size-medium wp-image-184" /></a><p class="wp-caption-text">I was a PC. Now I&#039;m a Mac.</p></div></p>
<p><a href="http://shawnfranklin.com/i-was-a-pc-now-im-a-mac/">I was a PC. Now I&#8217;m a Mac.</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/i-was-a-pc-now-im-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Adobe Flash Builder for Force.com</title>
		<link>http://shawnfranklin.com/getting-started-with-adobe-flash-builder-for-force-com/</link>
		<comments>http://shawnfranklin.com/getting-started-with-adobe-flash-builder-for-force-com/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 16:55:00 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/2011/02/getting-started-with-adobe-flash-builder-for-force-com/</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Today, I started development on a simple project using Adobe Flash Builder for Force.com. I must say getting the software installed as well as the plug-in was more difficult than I had expected, but all is well now. I say &#8230; <a href="http://shawnfranklin.com/getting-started-with-adobe-flash-builder-for-force-com/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/getting-started-with-adobe-flash-builder-for-force-com/">Getting started with Adobe Flash Builder for Force.com</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Today, I started development on a simple project using Adobe Flash Builder for Force.com. I must say getting the software installed as well as the plug-in was more difficult than I had expected, but all is well now.</p>
<p>I say &#8220;started&#8221;. I&#8217;ve actually built a RIA in the past using what used to be known as Adobe Flex Builder 3. It was a web-based application that used data grids and the accordion to show our available inventory data. It worked really well.</p>
<p>Now, Flex Builder 3 has gone away and Adobe has released Flash Builder 4 as its replacement. On top of that, Salesforce.com and Adobe have worked together to make RIA development on the Force.com platform even easier by providing Adobe Flash Builder for Force.com.</p>
<p>That, better stated, is where I am starting today.</p>
<p>This simple application I&#8217;m building is simply (1.) taking our Property data from our corporate website, (2.) randomly displaying a Property when the page loads and (3.) giving the user pagination controls to view all our Properties.</p>
<p>Once I&#8217;m done, I hope to be able to post a demo here. Stay tuned.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=f2749766-84b0-8a74-88cb-30dafbc86bc1" /></div>
<p><a href="http://shawnfranklin.com/getting-started-with-adobe-flash-builder-for-force-com/">Getting started with Adobe Flash Builder for Force.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/getting-started-with-adobe-flash-builder-for-force-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Quotes in the Sales Cloud</title>
		<link>http://shawnfranklin.com/using-quotes-in-the-sales-cloud/</link>
		<comments>http://shawnfranklin.com/using-quotes-in-the-sales-cloud/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 19:16:55 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Tech Notes]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/2011/02/using-quotes-in-the-sales-cloud/</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Quick shout out to Salesforce.com and the new Quotes object released in Winter &#8217;10. We just now got around to enabling Quotes and it has been a breeze to set up. Plus, I&#8217;ve been able to create three different Quote &#8230; <a href="http://shawnfranklin.com/using-quotes-in-the-sales-cloud/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/using-quotes-in-the-sales-cloud/">Using Quotes in the Sales Cloud</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Quick shout out to Salesforce.com and the new Quotes object released in Winter &#8217;10.</p>
<p>We just now got around to enabling Quotes and it has been a breeze to set up. Plus, I&#8217;ve been able to create three different Quote templates with great ease. In sum, I&#8217;ve spent roughly a week setting it all up.</p>
<p>This now enables us to track and report on billable hours and revenue all in one place (Salesforce.com) that was previously being tracked in two systems: Salesforce.com and another, unnamed system.</p>
<p>Now, our Sales Management can see both low-frequency, high-value Opportunities in the same report as high-frequency, low-value Opportunities if they wish.</p>
<p>Kudos.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=252a1c17-3c89-89f7-aa6c-7938003cbf47" /></div>
<p><a href="http://shawnfranklin.com/using-quotes-in-the-sales-cloud/">Using Quotes in the Sales Cloud</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/using-quotes-in-the-sales-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recommended TED Talk</title>
		<link>http://shawnfranklin.com/recommended-ted-talk/</link>
		<comments>http://shawnfranklin.com/recommended-ted-talk/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 16:22:09 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/?p=173</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>TED.com has some great videos. This video is just one of them. The speaker in this video &#8211; Jason Fried &#8211; gives a refreshing take on getting work done at work. Most of the ideas presented here are from his &#8230; <a href="http://shawnfranklin.com/recommended-ted-talk/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/recommended-ted-talk/">Recommended TED Talk</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p><a href="http://www.ted.com">TED.com</a> has some great videos. This video is just one of them.</p>
<p>The speaker in this video &#8211; Jason Fried &#8211; gives a refreshing take on getting work done at work. Most of the ideas presented here are from his book, &#8220;<a href="http://www.amazon.com/Rework-Jason-Fried/dp/0307463745/ref=sr_1_1?qid=1292948332&amp;sr=1-1">Rework</a>&#8220;, which I recommend as well.</p>
<p><!--copy and paste--><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="446" height="326" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="bgColor" value="#ffffff" /><param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/JasonFried_2010X-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/JasonFried-2010X.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=1014&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=jason_fried_why_work_doesn_t_happen_at_work;year=2010;theme=a_taste_of_tedx;theme=not_business_as_usual;theme=new_on_ted_com;event=TEDxMidwest;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><param name="src" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" /><param name="bgcolor" value="#ffffff" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="446" height="326" src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" flashvars="vu=http://video.ted.com/talks/dynamic/JasonFried_2010X-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/JasonFried-2010X.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=1014&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=jason_fried_why_work_doesn_t_happen_at_work;year=2010;theme=a_taste_of_tedx;theme=not_business_as_usual;theme=new_on_ted_com;event=TEDxMidwest;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" bgcolor="#ffffff" wmode="transparent" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://shawnfranklin.com/recommended-ted-talk/">Recommended TED Talk</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/recommended-ted-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Now a Salesforce.com Certified Administrator</title>
		<link>http://shawnfranklin.com/now-a-salesforce-com-certified-administrator/</link>
		<comments>http://shawnfranklin.com/now-a-salesforce-com-certified-administrator/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 15:07:41 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Resume]]></category>

		<guid isPermaLink="false">http://www.shawnfranklin.com/?p=135</guid>
		<description><![CDATA[<p><p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Just got back from Dreamforce 2010 and have a mountain of notes and ideas to review! North of 25,000 people were at this years event, which made for an exciting time. We had typical year-end San Francisco weather (cloudy, fog, &#8230; <a href="http://shawnfranklin.com/now-a-salesforce-com-certified-administrator/">Continue reading <span class="meta-nav">&#8594;</span></a></p></p><p><a href="http://shawnfranklin.com/now-a-salesforce-com-certified-administrator/">Now a Salesforce.com Certified Administrator</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://shawnfranklin.com">Shawn Franklin</a></p><p>Just got back from Dreamforce 2010 and have a mountain of notes and ideas to review! North of 25,000 people were at this years event, which made for an exciting time. We had typical year-end San Francisco weather (cloudy, fog, rain and dreary) and Stevie Wonder and will.i.am were both great acts.</p>
<p>I hope you noticed the new Administrator Certification badge. Getting the ADM201 certification means that I now have two Salesforce.com certifications!</p>
<p>Last year, after passing the DEV401 certification, they had a sign made in front of the exhibit hall with all the names of those who received certification at Dreamforce &#8217;09. This year, either they didn&#8217;t make the same sign or I never saw it. So, instead, here is a pic of the hordes of people making their way to hear Bill Clinton speak.</p>
<div id="attachment_136" class="wp-caption aligncenter" style="width: 310px"><a href="http://shawnfranklin.com/wp-content/uploads/2010/12/Dreamforce_2010_11.jpg"><img class="size-medium wp-image-136" title="Dreamforce_2010_1" src="http://shawnfranklin.com/wp-content/uploads/2010/12/Dreamforce_2010_11-300x224.jpg" alt="Dreamforce 2010" width="300" height="224" /></a><p class="wp-caption-text">Dreamforce 2010</p></div>
<p><a href="http://shawnfranklin.com/now-a-salesforce-com-certified-administrator/">Now a Salesforce.com Certified Administrator</a></p>]]></content:encoded>
			<wfw:commentRss>http://shawnfranklin.com/now-a-salesforce-com-certified-administrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: shawnfranklin.com @ 2012-05-21 02:24:42 by W3 Total Cache -->
