Salesforce is big! And when your a developer heading over to the Salesforce world for the first time, it can be easy to get a little lost. Being a developer we tend to fall back on code to solve things. I started using Salesforce as a database a few years ago with a php application. Here are some Force.com tips that I learned along the way.
What I wish I knew then:
1. Salesforce solves a lot of common issues for you. Opportunities, Accounts and Contacts, Campaigns and Campaign Members, and other standard objects are great, and have some unique behaviors and relations to allow for multitudes of use cases.
2. Workflows allow there to be a process around changes of data and their influences. When working with complex business data, we have to make sure that all the data follows the process and that it always behaves the way it should. Keeping track of business processes in code on several pages and components can be a daunting task. Instead of setting a status at some level or updating a status based on some code event, look to workflows to handle these.
3. When a batch process needs to occur or some data event that happens uniquely on a page that needs to be solved with code, don’t forget about triggers. If a workflow can’t solve your problem, what about a trigger? Triggers give you a way to manipulate data in advanced ways, triggering off of some DML so we can fine tune new, changed, and deleted records in the system. The best part about triggers is they work everywhere. If you inserted data in a batch job, from a standard salesforce page, a custom page, or an external application. Solve once and reuse many. While some people may think knowing some tags and little tricks to coding on the platform are important for beginners, I think learning the platform and exploiting all of its potential first is the most important.
4. Standard objects in Salesforce are designed to be fairly flexible and offer great uses out of the box. Too often as developers, consultants, and clients, we want to jump right in and start to use the system and then figure out what we want. This can be ok for small projects, but most projects need a little more thought in the design phase. If you are not using objects in the system, don’t start to go and create the wheel again, see if you can leverage existing features. Need to make a group of contacts and leads relate over a common event, Campaign and Campaign members are there for you. Take time to inventory what you have in the system, before creating more.
Finally while the system can do a lot for us, there is not always a simple way to complete some tasks, which is why we as developers have jobs.