There are two broad types of change that can be made within Salesforce:

  • Declarative changes
  • Code changes

In this article we'll focus on code changes, what they are, and how they are made.

What is a code change?

Some customisations require more complexity than can be achieved via declarative changes. They may require writing custom logic which triggers complex workflows, or custom integrations to perform automated tasks outside of Salesforce.

These sorts of changes are generally known as code changes, as they require the Salesforce user to write new code rather than clicking around in the UI.

The benefits of code development

Custom code enables developers to build complex business processes, customized user interfaces, and integrations with third-party systems, which can’t be developed using declarative tools.

There is really very little limit on what can be created through custom code in Salesforce - it's an incredibly powerful toolkit.

How code changes are made

All code changes in Salesforce are created in Apex, the Salesforce programming language. Apex is an object-oriented programming language that uses syntax very similar to Java.

Code changes are generally created in one of three ways:

  • Using the Apex console in a developer org
  • Via an Integrated Development Environment (IDE). An IDE is a software suite that consolidates the basic tools developers need to write and test software. Typically, an IDE contains a code editor, a compiler, and a debugger that the developer accesses through a single user interface
  • By hand in some form of code or text editor (such as Sublime)

Below is some example code in the form of an Apex class:

Code changes can do almost anything in an org:

  • Creating an automated workflow to notify your support team when a user performs a series of actions in an org
  • Taking data from a marketing tool and using it to update contact records in Salesforce
  • Building a whole custom application for your company, such as a CPQ tool or finance reporting system

Want to learn more?

You can learn more about Apex in the Salesforce Trailhead Developer Beginner module here.

Did this answer your question?