1. Get Id from current page 1.1 Add 'force:hasRecordId' to implements <aura:component implements="force:hasRecordId"> 1.2 Create attribute to receive Id <aura:attribute name="recordId" type="Id" /> 1.3 In controller js component.get("v.recordId");
3. Call Method from trigger to apex and with list<Account> and Map<Id,Account> In Apex class: public class UpdateAccTriggerHandler { public void updateAccountTest(List<Account> newAccList, Map<Id,Account> oldMap){ for(Account acc:newAccList){ //your code... } } } In Trigger : UpdateAccTriggerHandler updateAcc = new UpdateAccTriggerHandler (); updateAcc .updateAccountTest(Trigger.New, Trigger.oldMap);
7. How to render Visualforce page to PDF then Download it. 1. You need to have two page first page is main page <apex:page id="MainPage" showHeader="false" cache="true" contentType="application/x-pdf#PDF_Name.pdf" <apex:include pageName="SecondpageName"/> </apex:page> 2. your second page <apex:page renderAs="pdf" >//your code</apex:page>
Comments
Post a Comment