Category: Salesforce

Using Basic Email templates from Salesforce Apex Code

Using Basic Email Templates From Salesforce Apex

Sending Emails from Salesforce is pretty easily implemented using Salesforce and the Email Templates. I strongly recommend using Email Templates over visualforce emails and hardcoding text emails within the source code because making changes can be really time consuming otherwise. Of course, there are times when it makes sense to use visualforce emails or hardcoding text emails but these exceptions should not be the norm. Continue reading

Salesforce Deployment Methods

Salesforce Deployment Methods

One of the most important parts of the Software Development Life Cycle (SDLC) is the the deployment process. In Salesforce, deployments aren’t really much more than copying metadata from one Salesforce organization to another. Salesforce has a few different deployment methods. Continue reading

How to Decrease Deployment Time in Salesforce

How to Decrease Deployment Time in Salesforce

In Salesforce, whenever Apex and triggers are deployed all of the apex tests are run as part of the deployment process. In an org with a lot of test classes and customizations it can take a really long time to run the tests which will increase the amount of time it takes for deployments. Continue reading

Updating Salesforce Records Using JavaScript

Updating Salesforce Records Using JavaScript

Over the last few years, Salesforce has made some really significant changes that allow JavaScript to increasingly be used. By using Salesforce’s AJAX toolkit it’s possible to do an incredible amount of customization to a standard Salesforce Page Layout without ever having to write any apex. Continue reading

How to Select All Fields in SOQL

How to Select All Fields in SOQL

Instead of using Standard Query Language (SQL), Salesforce decided to create it’s own variation of the language for querying their databases. Salesforce Object Query Language, known as SOQL, has a basic syntax that is very similar to SQL but there’s some differences. Continue reading

Useful Google Chrome Extensions for Salesforce Developers & Admins

Useful Google Chrome Extensions for Salesforce Developers & Admins

Chrome extensions help Salesforce Developers and Salesforce Admins work a lot more efficiently in Salesforce. If you’re using Google Chrome and Using Salesforce, you really need to check out some of these Chrome Extensions. All of the extensions I’ve listed below are available for free and don’t require any special apps from the AppExchange. Continue reading

Salesforce Order of Execution

Understanding the Salesforce Order of Execution

As Salesforce Developers and Salesforce Administrators, we need to understand how the system will process and validate the data that we are inserting or manipulating. As any system does, the rules follow a general pattern that’s known as the Salesforce Order of Execution. Continue reading

How To Reduce Visualforce’s View State

How to Reduce Visualforce View State

View State is a technique Salesforce uses to maintain the current state of the page and the data that was queried between the user requesting things from the server and sending any changes back to the server.If the view state gets too large problems can begin to occur. Continue reading

Salesforce Developers Need to Learn JavaScript Today

Salesforce Developers Need to Learn JavaScript Today

Over the years, it’s been possible for Salesforcce Developers to avoid needing to learn JavaScript because things could usually be done through a combination of apex and visualforce. If you don’t know JavaScript and you are a Salesforce Developer, you need to really consider finishing this post and learning JavaScript. Continue reading

How to Automatically Convert Leads in Apex

How To Automatically Convert Leads In Apex

In the blog post “What’s the difference between a Lead and Opportunity?” I spent a bit of time covering how leads are converted into accounts, contacts, and opportunities.

Basically, a lead is converted when the sales person thinks that there’s actually an opportunity to sell them something. In a lot of cases, it might make sense of for leads to be automatically converted after a field is set to a certain value. For example, a lot of companies might want to automatically convert a Lead as soon as the Sales Rep has completed ANUM or BANT.

To convert a Lead into an Account, Contact and an Opportuninity we need to make use of the Database.convertLead method.