1. Page Break
While generating PDF template from Visualforce, if you want to give the page break ,below code snippet is very useful.
You can use the page break style properties to control where the browser will insert a page break. The Force.com PDF content converter will carry that over to the PDF.
This is page one
2. Page layout and Page number
The following snippet shows you have to switch the PDF page layout to landscape and add page numbers to your Visualforce page. Use the below code in CSS of Visualforce page.
/* Landscape orientation */
/* Put page numbers in the top right corner of each page in the pdf document. */
content: “Page ” counter(page);
The Apex Developers Guide says there is a maximum of 10 sendEmail methods per transaction (page 310). Is this counted by individual message sent, or by line of code executed? Example: What if you have 11 messages in a Messaging.SingleEmailMessage array and call the sendEmail method once using this array? (Each message in the array has slightly different content, which is why I’m not using mass email.)
Solution (Ack : Anand)
The limit is on the number of times “SendEmail(…)” method is called not the number of SingleEmailMessage int he Array. So theoretically you can send 10 x 1000 emails (assuming you have an array of 1000 SingleEmailMessage for every sendEmail call) .
Salesforce Chatter is a new way to collaborate with people in your company, in real time, in a private, completely secure way.
This is your homepage. Right away you can see how Chatter brings your business applications to life.The first thing you see is your picture and your latest status update.
When you click on your picture, or on the profile tab,you’re brought to your work profile where you can share your skills and background with everyone in your company.
In the middle of the page is where you post your status. It’s where you let everyone know what you’re working on.
You can also attach links and files to go with your updates whether you’re at a conference looking for new business or just asking your colleagues for advice.
People can see your status in real time, and respond immediately with helpful information.
Now let’s take a look at the people tab,here you have a private corporate directory that makes it easy to find colleagues and follow them if you want to see their updates.
Back on our homepage, you can open your main Chatter Feed. It puts all of your updates right in front of you in one place.
You can see updates from the people you’re following,plus you can immediately see when new files have been updated, like this presentation.
But Chatter helps you do a lot more than follow people, you can also keep track of everything that’s happening with your applications and specific records that matter to you.
Like updates from your deals, your customer cases, and your custom app records like this project. You can even get updates from Non-Salesforce apps like back office finance or HR systems. Here you can see an update to an account you’re following. From your feed you can drill right into the underlying detail.
Here we are on the account record. You can see all of the account details, and expand the Chatter feed to see the latest updates. At the top is where you can choose to follow this account.
Here you can see who else is following it. And if you created or own this record, you will automatically follow it.You will also automatically follow the people and records you work with most often.
With Chatter, every record also has it’s own feed. For example, people from across the company who work on this account can collaborate on it right here. When someone makes a change, or a document is modified, everyone who is following is immediately updated.
With Chatter, you can also create groups to collaborate on any team project whether it’s a Sales opportunity, an HR project, a product, or your team.
You can create groups in just a couple of clicks. You simply choose whether you want a public or private group,and then invite your colleagues to join. Here’s a group for a consulting project related to this account.
Chatter also makes it easy for groups to collaborate on documents. Here’s a project plan that someone just posted to the group. You can preview and comment on it right in the feed.
Finally, you can bring Chatter with you on the road. It works with your mobile device, like your iPad, iPhone or Blackberry. No matter where you go, Chatter makes sure you have your realtime updates right at your fingertips.
That was a quick look at Chatter. A powerful way to collaborate with people in your company in realtime, in a private, completely secure way. So what are you waiting for? It only takes a minute to get started. Simply create your profile, follow your colleagues, and let people know what you’re working on.
Setup Enhancer for Salesforce is about to make navigating the Setup tree a whole lot easier. It makes your life really easy by searching and showing you only the matched setup options. Full marks to this small yet useful script.
Setup Enhancer for Salesforce is a Greasemonkey script that helps you find just what you’re looking for in Setup with a minimal number of keystrokes. Looking for Account Validation Rules? Don’t hit all those plus signs out there and scroll down endlessly. Type “val” and you’ll have one list of just validation rules. To learn more, check out the video.
All you need to run Setup Enhancer for Salesforce is
Action Plans is a new, free app for Salesforce.com (from the Force.com Labs) that in a nutshell puts best practices into reusable “task templates”. Task templates can help you create automatic follow ups when your organization receives new donations and normalize the staff’s task generations on new leads.
Action Plans allow your organization to create multiple tasks (independent and/or dependent) for a lead (or other Salesforce.com objects), assign tasks to a specific user, and supports the creation of up to 20 action plans at a time.
Jesper Joergensen has a good blog post that answers many important questions around VMForce. To add, Mike @embracingthecloud lists following really good thoughts about VMForce.
The VMForce value proposition:
Download Eclipse and SpringSource
Signup for a Salesforce Development account and define your data model
Write your Java app using objects that serialize to Salesforce
Drag and drop your app onto a VMWare hosted service to Force.com to deploy
The partnership breaks down as:
VMWare hosts your app
Salesforce hosts your database
The 2 are seamlessly integrated so that Java Developers can effectively manage the persistence layer as a black box in the cloud without worrying about setting up an Oracle or MySql database, writing stored procedures, or managing database performance and I/O. For larger organizations already using Salesforce but developing their custom Java apps, this opens up some new and attractive options.
CIO’s are being bombarded with virtualization as a viable cloud computing solution, so I think Salesforce has wisely taken a step back and taken a position that says
“We do declarative, hosted databases better than anyone else. Go ahead and pursue the virtualization path for your apps and leverage our strength in data management as the back end”
The post ends with two really good questions …
The connection between VMWare and Salesforce is presumably via webservices and not natively hosted in the same datacenter. Does this imply some performance and latency tradeoffs when using VMForce?No. Per the comment from David Schach, the app VM is running in the same datacenter as the Force.com DB.
It strikes me as quite simple to develop Customer/Partner portals or eCommerce solutions in Java that skirt the limitations of some Salesforce license models when supporting large named-user/low authentication audiences. Will Salesforce limit the types and numbers of native objects that can be serialized through VMForce
WordPress-to-Lead provides small businesses that use WordPress as their primary web platform a way to add contacts and customers automatically to their Salesforce CRM.
In the past, WordPress users had to copy and paste leads into Salesforce — a messy process to be sure. The new Salesforce WordPress plugin solves that issue by creating contact forms that send information directly to Salesforce.
Many businesses are built on the pillars of WordPress, so we bet that there will be a lot Salesforce customers jumping for joy once they hear the news.
If you want to learn how to get started with the plugin, Salesforce has also created a YouTube video showing the steps:
The Salesforce.com user interface allows you to specify whether or not to send an email when the following events occur:
Creation of a new case or task
Creation of a case comment
Conversion of a case email to a contact
New user email notification
In Apex scripts saved against API version 15.0 or later, the Database.DMLOptions emailHeader method enables you to specify additional information regarding the email that gets sent when one of the events occurs because of the script’s execution.
The following are the options that can be set with the emailHeader method:
triggerAutoResponseEmail : Indicates whether to trigger auto-response rules (true) or not (false), for leads and cases. In the Salesforce.com user interface, this email can be automatically triggered by a number of events, for example creating a case or resetting a user password. If this value is set to true, when a case is created, if there is an email address for the contact specified in ContactID, the email is sent to that address. If not, the email is sent to the address specified in SuppliedEmail.
triggerOtherEmail : Indicates whether to trigger email outside the organization (true) or not (false). In the Salesforce.com user interface, this email can be automatically triggered by creating, editing,or deleting a contact for a case.
triggerUserEmail : Indicates whether to trigger email that is sent to users in the organization (true) or not (false). In the Salesforce.com user interface, this email can be automatically triggered by a number of events; resetting a password, creating a new user, adding comments to a case, or creating or modifying a task.
In the following example, the triggerAutoResponseEmail option is specified:
Account a = new Account(name=’Acme Plumbing’);
Contact c = new Contact(email=’firstname.lastname@example.org’, firstname=’Joe’,lastname=’Plumber’,accountid=a.id);
insert c; Database.DMLOptions dlo = new Database.DMLOptions();
dlo.EmailHeader.triggerAutoResponseEmail = true; Case ca = new Case(subject=’Plumbing Problems’, contactid=c.id);