Cirrius Solutions strongly believes in leveraging proven standards and Salesforce development best practices whenever possible to help ensure successful engagements with our clients.  We have authored a number of Salesforce.com specific guidelines in the areas of Environments, Configuration, Advanced Development and Release Management. I work closely with our clients to share this information and customize it when necessary to align with a client’s existing process and procedures.  Below are some quick best practice gridlines for your Salesforce implementation.

Golden Rule – Declarative Before Programmatic:

Always look for a declarative solution first!  The number one rule that every system administrator and developer should follow is how can we best use the declarative (ie. configuration) aspects of the platform to solve our specific business requirement before considering any programmatic or coding option.

There are a few key reasons for this:

  1. Declarative is automatically scalable
  2. Declarative is Governor Limit safe
  3. Declarative is quick to implement and requires less maintenance.
  4. Declarative is easily altered as the business changes
  5. Declarative does not require developer skillset to implement

Salesforce Development Best Practices

Development Best Practices

When declarative configuration is not enough to achieve your requirements you will need to utilize Force.com advanced development.  Force.com code is an object-oriented programming language with domain-specific classes and methods. It was designed to integrate tightly with the Force.com database layer and other platform services and to execute efficiently and safely in our multitenant cloud-based architecture.

Because Force.com code uses a familiar Java-like syntax, seasoned developers will get up to speed quickly.  Force.com code supports the common stored procedure and database programming idioms, it’s easy to write data-centric logic, such as triggers, that execute before or after records are inserted, updated, or deleted.

Using Salesforce Development Best Practices you can:

  1. Attach custom logic to fundamental database operations so that it executes whenever the specified operation executes, regardless of whether the operation originates in the UI or from the Web services API.
  2. Modularize logic into Force.com classes that can be called from other Force.com classes and triggers, to reuse and standardize code.
  3. Expose Apex classes as Web services that can be invoked from external systems, either publically or through secure access methods.
  4. Create custom controller logic that works in conjunction with Force.com pages to manage user interface behavior. For example, a Force.com controller can manage the flow from page to page in response to user input in a multi-step wizard.
  5. Perform complex validations across multiple objects. For example, if the user changes the stage on an opportunity, you can specify that the record must include line items, at least one contact role, and at least one quote before the record can be saved.
  6. Create complex business processes not supported by workflow. For example, when a user creates a lead record, you may want to check for duplicate leads. If you find dupes, you can prevent the record from being saved.
  7. Create custom transactional logic (database operations that affect multiple objects as a logical unit of work, not just with a single record or object). For example, if you build a custom work-order process, you may want to check that all child work orders are completed before updating the parent work order.
  8. Perform long-running calculations or business processes in an asynchronous or batch execution mode.  These operations run in the Force.com service and can be initiated on demand or scheduled to run on a recurring basis through a job scheduler.
  9. Integrate with external Web services using intuitive frameworks such as XMLStream, HTTP Classes, and WSDL2Apex.
  10. Develop and execute test methods alongside your business logic that ensures your code continues to work as intended throughout the entire life cycle.

If you need to customize and/or extend Salesforce CRM please contact your Cirrius Solutions to learn how we can help you accelerate your CRM success using Salesforce Development Best Practices.