• 1Installation
  • 2Preliminary Knowledge
  • 3Cache Management
  • 4Config Service
  • 5Config Handlers
  • 6Read Configuration
  • 7Write Configuration
  • 8Integrations

Config.apex

  • Docs
  • Tutorials
Getting started with Config.apex

Read Configuration

After the config service is set up, we can use it globally to read configurations.

String version = (String)configService.read('/System/version');
// equivalent to
String version = (String)configService.get('/System/version');

By default, we can even specify what kind of data type we want to get.

String version = (String)configService.read('/System/version?type=String');

Config.apex will convert the result configuration value according to the type you specified.

Done