This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color: #06192e; | |
text-align: center; | |
font-weight: 300; | |
margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalloutClass { | |
@future(callout=true) | |
public static void makeCallout() { | |
HttpRequest request = new HttpRequest(); | |
// Set the endpoint URL. | |
String endpoint = 'http://yourHost/yourService'; | |
request.setEndPoint(endpoint); | |
// Set the HTTP verb to GET. | |
request.setMethod('GET'); | |
// Send the HTTP request and get the response. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the account sObject | |
Account acct = new Account(Name='Acme', Phone='(415)555-1212', NumberOfEmployees=100); | |
// Insert the account by using DML | |
insert acct; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EmailManager.apxc file | |
public class EmailManager { | |
// Public method | |
public void sendMail(String address, String subject, String body) { | |
// Create an email message object | |
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |
String[] toAddresses = new String[] {address}; | |
mail.setToAddresses(toAddresses); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello.vfp | |
<apex:page> | |
<h1>My Fancy Site</h1> | |
<apex:insert name="body"/> | |
</apex:page> | |
///////////////newPage.vfp///////////////// | |
<apex:page sidebar="false" showHeader="false"> | |
<apex:composition template="Hello"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Override the Standard Display for a Page | |
The Visualforce page you created in Using Standard Controllers can function as a replacement to the standard detail page for an account. You can modify the standard user interface generated by the platform to ensure that your page gets shown instead of the standard page. | |
1. From the object management settings for accounts, go to Buttons, Links, and Actions. | |
2. Click Edit next to the View item. | |
3. For Override With, select Visualforce Page. | |
4. From the Visualforce Page drop-down list, select accountDisplay. | |
5. Click Save. | |
To view go to Accounts Tab, then select a Tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There’s a lot more to the Ajax and JavaScript support: | |
• <apex:actionStatus> lets you display the status of an Ajax request—displaying different values depending on whether it’s in-progress or completed. | |
• <apex:actionSupport> lets you specify the user behavior that triggers an Ajax action for a component. Instead of waiting for an <apex:commandLink> component to be clicked, for example, the Ajax action can be triggered by a simple mouse rollover of a label. | |
• <apex:actionPoller> specifies a timer that sends an Ajax update request to Force.com according to a time interval that you specify. | |
• <apex:actionFunction> provides support for invoking controller action methods directly from JavaScript code using an Ajax request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vfp file | |
<apex:page controller="ContactsListController"> | |
<apex:form> | |
<apex:pageBlock title="Contacts List" id="contacts_list"> | |
<!-- Contacts List --> | |
<apex:pageBlockTable value="{! contacts }" var="ct"> | |
<apex:column value="{! ct.FirstName }"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page> | |
<!-- Add the static resource to page's <head> --> | |
<apex:includeScript value="{! $Resource.jQuery }"/> | |
<!-- A short bit of jQuery to test it's there --> | |
<script type="text/javascript"> | |
jQuery.noConflict(); | |
jQuery(document).ready(function() { | |
jQuery("#message").html("Hello from jQuery!"); |
NewerOlder