Skip to content

Apex Consts

The Constants Framework provides a structured approach for managing constants in Apex.

API version

License

GitHub Repo starsGitHub Release

Why Apex Consts?

  • Request and Cache - Only necessary consts are saved in Apex memory.
  • Consts Modules - Separated const classes per sObjectType or business logic. No more God class.
  • Consts Entry Point - Access all your consts via the Consts class.
  • English-like Notation - Make your code clean with English-like notation: Consts.ACCOUNT.TYPE.PROSPECT.

Quick Start

apex
Account acc = new Account(
    Name = 'My Account',
    Type = Consts.ACCOUNT.TYPE.PROSPECT,
    Rating = Consts.ACCOUNT.RATING.HOT
);

Documentation

Installation

Released under the MIT License.