Posts

Showing posts from August, 2015

Opne a VF page in Print Mode using a custom Button

Step 1: Create a VF page  <apex:page standardController="Contact" sidebar="false" showHeader="false">   <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />      <style>         body{ font-size:14px;}                  .lblPrint{                      width:49%;             float:left;             border:1px solid White;             height:260px;         }     </style>          <apex:form > <div style='margin-left:5px;display:block;'> <div class='lblPrint'> <div class='MainPrint' style="padding-left:20px;padding-top:15px;" >                  <b> <apex:outputText value="{!UPPER(Contact.Salutation)}" style="font-size:14px;"/>&nbsp; <apex:outputText value="{!UPPER(Contact.Name)}" style="font-size:14px;"></apex:outpu

Send pdfContent using Trigger in salesforce

Requirement: I have VF page on render as pdf means it is PDF file. I want to send this pdf when in my object there is field "isSend" checkbox type is equal to true then send to users email ids ,   Send PDF using trigger using Web Service Class. you need to create two class and one trigger. And your VF Page Pdf class and page. Step 1: Create GETPDFContentController Class  /*   Before this you need to create a VFPage */ /** *   Created By### refernce No:20180555  :   Sumit Shukla *   Description :   This Apex class based on REST API which exposes POST method to send Email with * pdf content */ @RestResource(urlMapping='/sendPDFEmail/*') global class GETPDFContentController{      @HttpPost     global static void sendEmail(String EmailIds, String Subject, String body, string recordID) {     List<String> EmailIds = EmailIds.split(',');        PageReference ref = new PageReference('/apex/VFPageName?id='+recordID); // Firstly