You need to sign in to do that
Don't have an account?
Margiro
Send email after form is complete.
I need to have an email sent to myself when a new order is placed. It needs to be triggered when the final save button is hit(its in a wizard). I need the "save" button to first save,then trigger the email and perform "step4" action which brings it to an alternate confirmation page. How do I create this trigger?
Heres VF page code:
<apex:page sidebar="false" standardController="lead" showHeader="false" extensions="GLeadExtension">
<apex:composition template="{!$Site.Template}">
<apex:define name="body">
<h1>Conveyor Application Request Part 3/3</h1>
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!step4}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Installation - Additional Information" columns="2">
<apex:inputField value="{!Lead.Capacity_ton_h__c}"/>
<apex:inputField value="{!Lead.Other_intervals__c}"/>
<apex:inputField value="{!Lead.Total_conveying_distance_m__c}"/>
<apex:inputField value="{!Lead.Horizontal_m__c}"/>
<apex:inputField value="{!Lead.Vertical_m__c}"/>
<apex:inputField value="{!Lead.Number_of_bends__c}"/>
<apex:inputField value="{!Lead.Type_of_pipe_system__c}"/>
<apex:inputField value="{!Lead.Diameter__c}"/>
<apex:inputField value="{!Lead.Humidity_of_the_product__c}"/>
<apex:inputField value="{!Lead.Hygroscopic_moisture__c}"/>
<apex:inputField value="{!Lead.Product_picked_up_from__c}"/>
<apex:inputField value="{!Lead.If_Others__c}"/>
<apex:inputField value="{!Lead.The_installation_is__c}"/>
<apex:inputField value="{!Lead.The_operation_is__c}"/>
<apex:inputField value="{!Lead.Other_information__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:define>
</apex:composition>
</apex:page>
You need to use add the email functionality to the GLeadExtension action method , step4().
There is sample code for sending Outbound email with apex here.