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
/* | |
* @class FileUploaderClass | |
* @desc Lets you uplaod a file in Salesforce by giving a base64 string of the | |
* file, a name for the file, and the Id of the record that you want to attach | |
* the file to. | |
* | |
* @example: | |
* FileUploaderClass.uploadFile(myBase64String, 'Invoice.pdf', '906F0000000kG2UIAU') | |
*/ | |
public class FileUploaderClass { |
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 renderAs="PDF"> | |
<h1>Hello World!</h1> | |
</apex:page> |
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 renderAs="PDF"> | |
<head> | |
<style type="text/css"> | |
h1 { | |
font-size: 70px; | |
color: #009900 | |
} | |
</style> | |
</head> |
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 renderAs="PDF"> | |
<apex:stylesheet value="{!$Resource.myPageStyle}"/> | |
<h1 style="font-size: 70px; color: #009900">Hello World!</h1> | |
</apex:page> |
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 Example { | |
public static Blob generatePDF(String recordId) { | |
// create a virtual page | |
PageReference page = new PageReference('/apex/MyPage'); | |
// add our record id | |
page.getParameters().put('Id', recordId); | |
// generate and PDF blob | |
// You can save this blob as a file, document, or attachment! | |
return page.getContentAsPDF(); |
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 standardController="Account" renderAs="PDF"> | |
<h1 style="font-size: 70px; color: #009900">Hello {!record.Id}!</h1> | |
</apex:page> |
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
/* add margin and size to our page */ | |
@Page { | |
size: 300px; | |
margin: 20px; | |
/* add page's header and footer */ | |
@top-left { | |
content: element(header-section); | |
} | |
@bottom-left { | |
content: element(footer-section); |
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
Verifying my Blockstack ID is secured with the address 1rvPJ3XUnRRkEGK3HGzogEHQ9WVhndsKy https://explorer.blockstack.org/address/1rvPJ3XUnRRkEGK3HGzogEHQ9WVhndsKy |
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
mutation { | |
Account(Name: Test) { | |
Id | |
Name | |
CreatedDate | |
} | |
} |
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
mutation { | |
Account(Name: Test) { | |
Id | |
Name | |
Contact(FirstName: Joe, LastName: Smith) { | |
Id | |
Task(Subject: Call Joe) { | |
Id | |
} | |
} |