• 1Installation
  • 2Evaluate JavaScript Expressions
  • 3Evaluating with Context
  • 4Get Parsed Nodes

Script.apex

  • Docs
  • Tutorials
Getting started with Script.apex

Evaluating with Context

Pass the context in and we can evaluate using the variables inside.

Map context = new Map{
    'list' => new List{ 'a' },
    'map' => new Map{ 'name' => 'b'}
};
Object result = ScriptEngine.getInstance().eval('list[0] + map.name', context);
Done