Salesforce coding lessons for the 99%
Finally, Apex tutorials for point-and-click admins! Written by a self-taught Google engineer.
  • Beginner Tutorials
    • Apex
    • Certifications
    • Career Info
    • Technical Architect
    • Visualforce
    • Videos
  • Apex Academy
  • Success Stories
  • About Me
  • Misc
    • Mailbag
    • Challenges
    • Links
    • Login to my Org
Follow @dvdkliuor SUBSCRIBE!

Where to write Visualforce code

February 17, 2015

Preface – This post is part of the Visualforce series.

Here’s what you need to do to start writing Visualforce in your org:

1. Turn Development Mode on in your User Detail page

Your Name >> My Settings >> Personal >> Advanced User Details

Check both of these boxes and save!
This enables a Visualforce page editor anytime you’re viewing a Visualforce page.

2. Create a new Visualforce page

Setup >> Develop >> Pages >> New

3. Click the Preview button to open up the Visualforce editor

…and now you’re ready to start tinkering!

The editor on the bottom of the page lets you make changes to your code and see your results instantly after saving – it’s very convenient! This is my favorite way to write Visualforce!

Play around with the editor a bit before we begin our next tutorial!

Next post: How to create a basic Visualforce page!

1 Comment
Ram
May 26, 2015 @ 11:24 am

Hi Devid,

This is Ram.I able to send email to single email id in To,CC,BCC using below method, but i unable to send multiple email ids. i would like to send multiple email ids in to address.Please help me for sending multiple emails.

public PageReference SendEmail(){
System.debug(‘In SendEmail——‘);
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

if(emailCC!=”)
{
mail.setCcAddresses(new String[] {emailCC});
}
if(emailBcc!=”)
{
mail.setBccAddresses(new String[] {emailBcc});
}

mail.setSenderDisplayName(sendersemail);
mail.setSubject(emailsubject);
mail.setPlainTextBody(emailBody);
try{

mail.setToAddresses(new String[] {emailTo});

resultMail=Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

if(resultMail[0].isSuccess()){

Escalation_History__c eh = new Escalation_History__c ();
eh.Name = ‘Escalate Detail’;
eh.Incident__c = incidentId;
eh.Escalated__c = datetime.now();
eh.Escalated_By__c= UserInfo.getUserId();
if(Schema.sObjectType.Escalation_History__c.isCreateable()){
insert eh;
}
}
}

Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


*

*

Theme: Simple Style by Fimply