Skip to content

Instantly share code, notes, and snippets.

@rdehler
rdehler / Sample Save And Open PDF button
Last active August 29, 2015 14:01
Save and Open PDF template with Apex
/apex/SaveAndOpenPDF?id={!Contact.Id}
global class WebserviceExample {
webservice static String getStuff(String stuffToGet) {
}
}
<service name="WebserviceExampleService">
<documentation/>
<port binding="tns:WebserviceExampleBinding" name="WebserviceExample">
<soap:address location="https://cs22.salesforce.com/services/Soap/class/WebserviceExample"/>
</port>
</service>
@rdehler
rdehler / CommunitiesLogin.vfp
Created May 6, 2020 18:43
Proof of concept to use a partial username or even another
<apex:page id="loginPage" controller="CommunitiesLoginController" title="{!$Label.site.site_login}" showHeader="false">
<apex:form>
<apex:pageMessages></apex:pageMessages>
Username:
<apex:inputText value="{!username}" />
Password:
<apex:inputSecret value="{!password}" />
<apex:commandButton action="{!customLogin}"/>
</apex:form>
</apex:page>