The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
Public with sharing virtual class RestClient { | |
Public class RestClientException extends Exception {} | |
/* | |
* class variable creation - DO NOT EDIT | |
*/ | |
Public Map<String,String> headers; | |
Public String url; | |
Public String method; |
<!-- | |
Simple proof-of-concept to create a .ics calendar event with visualforce. | |
Inspired by Natalie Regier @gnatrae | |
This example uses url parameters to set the details of event. | |
You could create a custom button that invokes this page, like: | |
https://<your-salesforce-domain>/apex/vCalendarPage?start={!TEXT(Obj.StartDate__c)}&end={!TEXT(Obj.EndDate__c)}&subject=Event from Visualforce&description=This .ics event created with visualforce&location=The Cloud | |
An example with literal values you can copy & paste in your browser: | |
https://<your-salesforce-domain>/apex/vCalendarPage?start=20140524T140000&end=20140524T153000&subject=Event from Visualforce&description=This .ics event created with visualforce&location=The Cloud |
public class FileController { | |
@AuraEnabled | |
public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) { | |
base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); | |
Attachment a = new Attachment(); | |
a.parentId = parentId; | |
a.Body = EncodingUtil.base64Decode(base64Data); |
<messaging:emailTemplate subject="Close Opportunity" | |
recipientType="User" | |
relatedToType="Opportunity"> | |
<messaging:htmlEmailBody > | |
<html> | |
<body> | |
Opportunity: <a href="https://test.salesforce.com/{!relatedTo.id}"><apex:outputText value="{!relatedTo.name}"/></a> | |
<br/> |
public class Code39Controller { | |
// Determines if the check digit should be generated | |
// If true, scanners must be enabled to use it | |
public Boolean shouldCheckDigit { get; set; } | |
// The source string to use. Currently only supports | |
// the characters in the "keys" string. Do not use '*'. | |
public String sourceCodeValue { get; set; } | |
// The index for supported characters. | |
static String keys = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*'; |
/** | |
* Developed by Doug Ayers | |
* douglascayers.com | |
* | |
* Designed to be used by SendEmailInvocable class when sending | |
* several emails but need to stay within the apex governor limits | |
* of how many emails can be sent per transaction. Call this batchable | |
* with all the emails to send and set the batch size to max per transaction. | |
* https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm | |
* |
public with sharing class InvocableApexTemplate { | |
@InvocableMethod( | |
label = 'Name as displayed in Process Builder' | |
description = 'Tooltip as displayed in Process Builder' | |
) | |
public static List<Response> execute( List<Request> requests ) { | |
List<Response> responses = new List<Response>(); | |
public class DataDisplayController { | |
public String PDFData {get; set;} | |
public DataDisplayController(){ | |
PDFData = ''; | |
} | |
public PageReference downloadPDF(){ | |
System.PageReference pageRef = new System.PageReference('/apex/PDFGenerator'); | |
//Generated by FuseIT WSDL2Apex (http://www.fuseit.com/Solutions/SFDC-Explorer/Help-WSDL-Parser.aspx) | |
// Warning: DataStorageItem - All the XmlSchemaElements in '<xsd:choice>' element are added as members of the class. Choice Members: CreditCardData DE_DirectDebitData OrderId Function | |
// Warning: Action_element - All the XmlSchemaElements in '<xsd:choice>' element are added as members of the class. Choice Members: InitiateClearing InquiryCardInformation InquiryOrder InquiryTransaction StoreHostedData RecurringPayment Validate GetExternalTransactionStatus GetExternalConsumerInformation SendEMailNotification GetLastOrders GetLastTransactions ManageProducts ManageProductStock RequestCardRateForDCC RequestMerchantRateForDynamicPricing CreatePaymentURL | |
// Warning: InquiryTransaction_element - All the XmlSchemaElements in '<xsd:choice>' element are added as members of the class. Choice Members: OrderId TDate IpgTransactionId MerchantTransactionId | |
// Warning: Validate_element - All the XmlSchemaElements in '<xsd:cho |