Skip to main content

Posts

Showing posts from May, 2014

Salesforce - Common footer and sender email address for all emails from one department

if you are in situation where you are sending email out from salesforce and you want to use same  sender email address and footer.Lets say you are from customer service department and you department tag line is Best in service:) and you want to send email always from one email id bestineservice@mycompany.com for customer service department. Follow below steps- Common email footer(Organization wide email footer):- 1)login to salesforce 2)click on setup, in Admistration setup section click on Email footers then click on new on email footer screen. 3) enter all the details and click on same. Common Email address :-  1)click on setup 2) click on setup, in Admistration setup click on organization-wide address and then click on Add 3) fill the details and select the profile like customer service profile or depends on you situation and click on save  

Salesforce Trigger On After Insert

If you want to know what is salesforce trigger and when can we have trigger run ,please check my previous post about Salesforce trigger . In this post i will  be explaining how you can run your trigger after insert of record into database. Lests take an example. if you want to send email to someone in your organization  after every new account is created so you will need 1) Trigger implementation 2) Html email body/template 3) email receipants Trigger Implementation: From Setup, click Customize -> Accounts -> Triggers In the triggers section, click New. In the trigger editor, delete the default template code and enter this trigger definition: > 1.  trigger NewAccountCreationSendEmail on Account (after insert)      { 2.           for(Account act: Trigger.New)                {                        //code to send email Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); String toEmail = "emailid@gmail.com"; String[] to