This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apex:page controller="SiteLoginController" id="loginComponent" showheader="false" standardStylesheets="false"> | |
<h1 style="color: gray"> Community Login </h1> | |
<apex:form id="loginForm" forceSSL="true"> | |
<apex:outputPanel layout="block"> | |
<apex:pageMessages id="error"/> | |
<apex:outputLabel value="{!$Label.site.username}" for="username"/> | |
<apex:inputText id="username" value="{!username}"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="CustomerCommunityController" id="customercommunitycontroller" sidebar="false" showHeader="false" standardStylesheets="false" > | |
<head> | |
<title>Acme Customer Support</title> | |
<meta charset="utf-8" /> | |
<apex:includeScript value="{!$Resource.jquery}"/> | |
</head> | |
<script type="text/javascript"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page id="customercommunitycontroller" sidebar="false" showHeader="false" standardStylesheets="false" > | |
<head> | |
<title>Acme Customer Support</title> | |
<meta charset="utf-8" /> | |
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"/> | |
</head> | |
<script type="text/javascript"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StateUtil { | |
Map<String,String> stateMap = new Map<String,String>(); | |
public StateUtil(){ | |
stateMap.put('Alabama','AL'); | |
stateMap.put('Alaska','AK'); | |
stateMap.put('Arizona','AZ'); | |
stateMap.put('Arkansas','AR'); | |
stateMap.put('California','CA'); | |
stateMap.put('Colorado','CO'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String ACCOUNT_ID = '001D000000K2ES6'; | |
ContentNote n = new ContentNote(); | |
n.title = 'My Note from Apex'; | |
insert n; | |
ContentDocumentLink link = new ContentDocumentLink(); | |
link.LinkedEntityId = ACCOUNT_ID; | |
link.ContentDocumentId = n.id; | |
link.ShareType = 'V'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class TestController { | |
public String output { get; set; } | |
public PageReference run() { | |
String url = 'https://na1.salesforce.com/services/data/v23.0/chatter/feeds/news/me'; | |
HttpRequest req = new HttpRequest(); | |
req.setMethod('GET'); |