You will learn why Apex has no local run loop, what a local Apex runtime changes for testing, debugging and CI, and which platform rules still apply locally.
Why read this
The article is a vendor-led introduction to a third-party tool, so weigh its claims accordingly.
The article explains that Apex looks like Java but only compiles, runs and tests inside a Salesforce org, so every iteration means deploying, waiting and reading logs. It argues that this deploy-to-run loop is slow, and that CI pipelines need an org and certificate just to run unit tests. Its benchmark claims four open-source Apex suites of 837 tests took about 1 min 46 s in an org versus 2.4 s locally, with every test passing in both.
The author presents Renmy Runtime, a single binary that executes Apex, SOQL, DML and Salesforce Flows on a developer’s machine against an embedded PostgreSQL, with no org, Docker or JVM. Commands such as renmy test, renmy validate and renmy explain run tests, type-check changes and explain failures, and the tool reports line and branch coverage. A JetBrains plugin adds breakpoints in IntelliJ IDEA, a SOQL and Apex console, and mutation testing as a Pro feature. The CI example runs the suite and emits JUnit XML and Cobertura without an org.
The piece is candid that some differences remain: governor limits, order of execution and metadata-defined schemas still apply, and the runtime is not the platform itself. It recommends keeping sandboxes or Scratch Orgs for UI, integration and final validation, with renmy deploy checking the same bytes in the org before release.
You will learn how to define a Copilot custom agent that audits Apex for PMD and OWASP-style security issues inside the IDE, without external integrations.
Why read this
You will also see the review output format and the tool restrictions that keep the reviewer read-only.
The article argues that static analysis of Apex usually runs too late, in a CI pipeline that fails a pull request after the developer has finished the work. In locked-down enterprise orgs, adding external AI review bots or webhooks is often blocked by security approval, so the author proposes a review agent that stays inside the existing GitHub Copilot boundary.
The agent is a declarative Markdown file, a .agent.md, stored in .github/agents/ for team sharing or in ~/.copilot/agents/ for personal use. It has a YAML header that gives its name, description and permitted tools, here restricted to search and fetch so the agent cannot modify files. The body is a system prompt that lists the rules to check, such as ApexCRUDViolation, ApexSOQLInjection, OperationWithLimitsInLoop and AvoidHardcodingId, grouped by security, performance, architecture and test quality.
The author gives a sample service class with a concatenated dynamic SOQL string, no sharing keyword, no user-mode enforcement and a DML statement inside a loop. The agent reports each issue with a severity, the rule name, the file and line, a short explanation and a compliant fix. The article closes with three team practices: keep shared conventions in copilot-instructions.md, restrict reviewer tools to read and search, and keep deterministic Salesforce Code Analyzer runs in the pull-request pipeline for audit trails.
You will learn how Database.setSavepoint() and Database.rollback() undo DML made after a savepoint, and where that protection stops, such as external callouts and emails.
Why read this
The article includes a short worked example.
Call Database.setSavepoint()
Insert the Account
Insert the related Contact
Contact insert fails: catch the exception
Call Database.rollback(sp) to undo the Account
How a savepoint lets a failed Apex transaction undo its earlier database changes
The article describes a common problem: an Apex method performs several database operations, and a later one fails, leaving earlier changes saved. Savepoints address this by marking a point in the current transaction that can later be restored.
It presents two methods. Database.setSavepoint() creates the marker, and Database.rollback() reverses database changes made after it. The worked example creates an Account and a related Contact inside a try block, and on exception rolls back to the savepoint so the Account insert is undone.
The author notes that rollback does not undo every side effect. External API calls and emails already sent are outside the database transaction and are not reversed. The article also contrasts savepoints with partial-success DML using Database.insert(records, false), which is a different approach from a full rollback.
The limitations listed include that savepoints apply only within the current transaction, that Salesforce caps the number of savepoints, that certain transaction-control operations can invalidate them, and that DML and other transaction limits still apply. Best practices suggest creating savepoints only before operations that may need reversing, using clear exception handling, and testing both success and failure paths.
You will know where Apex source, test data and licence details go when renmy runtime runs, which settings turn telemetry off, and how it works offline and air-gapped.
Why read this
It is the questionnaire answers a security or procurement team will ask for.
Org-based test runs
Each test run deploys to a Salesforce org
Test data sits in the org sandbox
Each developer needs an org credential
Local runtime
Tests run on the developer's machine
Test data lives in an in-process database
Test runs need no org or credential
Where Apex runs and where data lives, before and after a local runtime
This vendor-written piece, published by Renmy UG of Berlin, gives security and procurement teams the answers they need for a questionnaire about renmy runtime, a local Apex runtime formerly called Nimbus. It executes Apex, SOQL, DML and Salesforce Flows on a developer’s machine against an embedded PostgreSQL, without an org, Docker or a JVM. Apex source is read locally and sent to no one. Tests run against schema read from the project’s metadata, so they need no connected org, and test data sits in an in-process database with no open network port, rolled back after each test.
The article then sets out what leaves the machine. The Free tier needs no network access. By default the runtime sends one privacy-minimal activation event to an EU-hosted service, which excludes code, paths, test names and record data. Pro licences also record one de-duplicated activation from headless CI. Either can be switched off with a single setting or environment variable. Pro and Team licence checks send the licence key to the Keygen licensing API, at most once a day. Activating a machine with renmy login also sends a hashed installation ID, hostname, display name, OS, architecture, CPU core count and account ID. Licences are cached for offline use for up to seven days.
For disconnected networks, the article says the binary can be copied into place without internet access, since the database engine is embedded, and the daily update check can be disabled. Enterprise customers can have licence validation on premises, with pricing from $20,000 a year. A command-by-command table lists what each command contacts. The Salesforce org remains the system of record and deployment target. The deploy flow validates the same payload in the org before deploying, and Pro release commands produce signed receipts for auditors.
The piece closes with a list of documents to attach to the questionnaire, including the security page, data processing addendum, subprocessor list and licence terms. It also gives pricing: Free at $0, Pro and Team free during the public beta with listed prices of $19 and $49 per month, and Enterprise on a custom contract.
You will learn how a raw List parameter in an @InvocableMethod crashes the Apex language server and disables member completion in the file, which signature shapes trigger it, and how the author's VS Code extension detects and fixes them.
Raw List in @InvocableMethod
Server logs IllegalArgumentException
Completion lost across the whole file
Shape not checked against element type
Raw List in plain method
Only a syntax error is reported
Completion keeps working
Harmless, so not flagged
Raw List parameters break completion in invocable methods but not in ordinary ones
The author wrote an @InvocableMethod with a raw List parameter and found that member completion stopped working throughout the class, while the Problems panel showed only a generic syntax error. The cause is an exception inside jorje, the Apex language server in the Salesforce Extension Pack. For invocable, static @AuraEnabled, @Http and global methods, the server unwraps the element types of collection parameters and expects exactly one type argument, so a raw List produces an empty list and the check fails.
To separate harmful shapes from harmless ones, the author ran the language server headless against 274 signatures and recorded whether it logged an exception and whether completion came back empty. A raw List in an invocable method crashed the file, as did List, unfinished forms and wrong argument counts. A raw List in an ordinary method was only a syntax error with completion intact, and Set and Map in invocable methods were clean. A raw collection as a return type makes the parser drop the method, which limits the damage to that method.
The author’s extension, Virga, flags only the shapes that broke, using two diagnostic codes, and offers quick fixes that insert a type such as List chosen from the file. After applying the fixes, the server stopped throwing in all 184 breaking cases and completion returned in 180 of 181 where it had failed.
You will learn how to express conditional display, badge coloring, arithmetic and blank checks as formulas inside HXL widget JSON, what the formula functions can and cannot do, and why deployed widget schemas can only grow.
Before: Apex
Precomputes ratingVariant
Computes winRate in Apex
Sends hasPhone and hasOpenPipeline
After: widget formulas
CASE() picks the badge variant
IF() guards the win rate division
NOT(ISBLANK()) checks the phone
Display logic moves from the Apex DTO into the widget itself
HXL widgets are declarative JSON components, currently in beta, that can be embedded in Claude, ChatGPT and Agentforce. Their {!…} expressions can use math, comparison and logic operators and functions such as IF, CASE, AND and LEN, so display logic can sit beside the display rather than in Apex. The author shows an account card whose display fields were first precomputed in an Apex DTO and then replaced with formulas for visibility, badge variant, win rate and phone presence.
The author notes limits. There are no formatting functions for dates or currency, so those values still need formatting in Apex, and there is no aggregate such as SUM or AVERAGE across a list. Moving an existing widget also has a catch: a deployed schema.json can only grow, so removing old properties requires deploying a new widget bundle and repointing the Custom Lightning Type renderer.
The post also points to the Headless Experience Layer Playground for testing formulas live and to a formula reference in the Salesforce platform-widget-generate skill for coding agents.
You will learn how a local runtime executes Apex and Flow metadata against an embedded database while enforcing governor limits and order of execution.
Why read this
The article explains how this approach accelerates the edit-test cycle and fits into your standard deployment workflow.
Local Apex runtime
Apex interpreter
Local database for SOQL and DML
Rule engine for limits and execution
The local Apex runtime is built from three core components
The article, written by the maker of renmy runtime (formerly Nimbus, renamed in October 2026), introduces a local Apex runtime: a program that executes Apex, SOQL and DML on a developer’s own machine without a Salesforce org. It argues that Salesforce developers work in a slow loop, where every edit is deployed to an org and tested there, while developers in Java, JavaScript and Go run tests locally in about a second. The author attributes this gap to Apex being multi-tenant and tied to the platform’s data model and order of execution. Cited costs include round trips to the org, CI that needs org credentials, outages that halt testing, and AI coding agents that cannot iterate quickly. A local runtime has three parts: an Apex interpreter, an embedded PostgreSQL database for real queries and DML, and the platform’s rules, including enforced governor limits, triggers and Flows in order of execution, and per-test rollback. A sample test runs in tens of milliseconds, and the article says the runtime is not a mock, not a Scratch Org and not a transpiler.
The article is clear that a local runtime does not replace the org. Lightning pages, user-facing Screen Flows, permission checks, real integrations and the deploy itself with Salesforce’s metadata validation still happen in the org. The author compares this to a Java team’s staging environment, which stays for integration and final checks but is not the only place code runs. The renmy deploy is described as running local test and coverage gates first, then a check-only validation in the target org, then the deploy. The tool also offers coverage reporting, mutation testing, a debugger in VS Code and JetBrains, an MCP server for AI coding tools, and an IDE plugin. A published benchmark reports that 837 tests from four open-source suites ran in about 2.4 seconds locally versus about 1 minute 46 seconds in an org, with all tests passing in both.
Installation is a single binary for macOS, Linux and Windows, with no JVM, Docker or org required, and the commands are renmy test “” from the project root, plus options for single classes, coverage and a browser dev UI. The free tier covers individual developers, while Pro and Team tiers are free during the public beta and listed at $19 per month and $49 per developer per month. The article links to a parity record, which it describes as not a claim of 100 percent accuracy, and to GitHub for issues and releases.
Readers will learn how to enforce least-privilege access when calling external language models from Apex, including proper use of WITH USER_MODE, Named Credentials, and response validation.
The article argues that connecting Salesforce to a large language model takes more than an API key. The integration should control which records and fields the model can reach, protect credentials, minimize the data sent, and stop AI output from triggering unauthorized actions. It proposes an architecture with five parts: Salesforce enforcing permissions, Apex or middleware handling authorization and request building, Named Credentials managing the endpoint and authentication, the LLM API generating output, and a validation layer checking results before they are shown or used. A support assistant summarizing Cases, for example, needs only subject, description and status, not full contact or financial history. Authorization should happen before data is sent to the model and again before any business action follows its response.
The piece distinguishes several permission mechanisms that must be combined rather than relying on OAuth scopes alone: integration identity, object permissions, field-level security, record sharing and application-level restrictions. In Apex, declaring a class with sharing does not enforce object and field permissions, so the article recommends WITH USER_MODE on supported SOQL queries, with Security.stripInaccessible() as an alternative for removing inaccessible fields. For credentials, it recommends never hardcoding API keys and instead using External and Named Credentials, granting access through Permission Sets, and keeping separate configurations for each environment. A sample Apex class summarizes a Case through the OpenAI Responses API, querying only needed fields, sending a minimal payload, and checking the HTTP status and response structure before returning text.
The article also covers defending against prompt injection, since record text from emails or tickets may contain malicious instructions. Its safeguards include treating retrieved text as untrusted, limiting fields and records, avoiding unrestricted query or tool access for the model, checking proposed operations against a server-side allowlist, requiring human approval for consequential changes, and filtering documents by user access before they reach the model in retrieval-based designs. For scale, it suggests asynchronous processing with Queueable Apex or middleware for longer tasks, bounded retries with backoff only for suitable errors, request identifiers to prevent duplicate actions, token and latency monitoring, and cache designs that respect permission changes. The conclusion urges starting with a read-only use case and adding write capabilities only after authorization and failure handling are tested.
Readers will learn how to structure Apex transactions to avoid governor limit exceptions by applying bulkification patterns, optimizing data operations, and designing realistic test suites.
The article explains that Salesforce multitenancy requires strict resource management through governor limits that cap SOQL queries, DML statements, CPU time, and heap size. Developers are advised to treat these boundaries as foundational design constraints rather than post-development hurdles.
Core recommendations focus on eliminating database operations from iterative loops. The piece demonstrates collecting target identifiers into sets, executing single bulk queries, and populating maps for rapid lookups. It also shows how to accumulate records into lists for batch insertions while checking for empty collections beforehand.
Efficient use of Apex collections and comprehensive testing strategies receive equal emphasis. Writers are instructed to select appropriate collection types based on lookup needs and to validate logic against high record volumes. Testing must account for downstream automation overhead and varying data relationships to prevent unexpected limit exhaustion.
Finally, the guide outlines ongoing maintenance practices, including reviewing debug logs and refactoring inefficient code as data scales. It notes that persistent limit failures often stem from interconnected automation layers, requiring architects to evaluate broader system design alongside individual class performance.
By Cody Snell · Salesforce NewsThe piece also outlines the tools available for auditing, testing, and maintaining human oversight over autonomous agents.
Readers will learn how Agentforce separates language reasoning from business actions by routing decisions through Flow, Apex, and Agent Fabric.
Why read this
The piece also outlines the tools available for auditing, testing, and maintaining human oversight over autonomous agents.
Agentforce divides agent operations into two distinct layers to balance capability with control. A generative layer handles natural language processing and reasoning, while a deterministic layer manages all consequential actions.
Consequential decisions are routed through established Salesforce automation and development tools like Flow, Apex, and Agent Fabric. This ensures every action adheres to predefined business policies, permissions, and escalation paths rather than relying solely on model predictions.
The system maintains accountability through the Atlas Reasoning Engine, which requires agents to justify their steps, and a comprehensive audit trail that logs both agent and human activity. Continuous evaluation is supported by the Testing Center for bias detection and the Trust Layer for input and output safety.
You will see how one Custom Metadata Type can feed formulas, Validation Rules, Flow, Apex and Agentforce actions, and where those references stop working.
Typed into each tool
Thresholds in formulas
Defaults in Flows
Feature switches in Apex classes
Each change means finding every use
Custom Metadata Types
One deployable home for values
Travels through source control
One record per region plus Default
Read via $CustomMetadata reference
One deployable home replaces values typed into each formula, Flow or Apex class
The article argues that developers often hard-code business values such as thresholds, defaults, feature switches and mappings into formulas, Flows and Apex without noticing, which makes later changes hard to trace. Custom Metadata Types offer a central, deployable home for these values. Unlike Custom Settings or Custom Objects, which hold data, Custom Metadata holds configuration that ships with application code through source control and CI/CD. The author illustrates this with a Deal_Policy__mdt type holding a shared maximum discount and regional records for large-deal amount, default discount and approval threshold, selected by region name.
The piece then maps where references work. Formula Fields, Validation Rules and field defaults can use a three-part reference (type, record name, field), but the formula must name a fixed record, so it cannot pick a region from opportunity data. Long text area fields cannot be referenced, and the formula editor does not list Custom Metadata fields for defaults, though typing the reference still works. Flow can query the type with Get Records, match a region, and fall back to the Default record, and it can also use the literal reference. Apex uses getInstance with a similar fallback. Custom Permissions are kept separate, since they govern what a user may do while Custom Metadata governs the values.
Agentforce cannot read $CustomMetadata references directly, so the workaround is an invocable Apex action that loads the policy and returns the values, which the Agent Script maps into variables before answering. Lightning App Builder component visibility does not accept Custom Metadata references. On record pages a Formula Field can bridge the value, though that adds a field, and App and Home pages must read the data in Apex, through @wire, or via Dynamic Interactions.
To assess impact, the article recommends Setup’s Where is this used? option or a Tooling API query of MetadataComponentDependency, which lists the Apex classes and Validation Rules that depend on a field. It also notes that an attempt to build an LWC editor that showed these dependencies from Apex was complicated by the authentication setup REST calls require. Finally, it outlines platform limits: 200 types per org (350 with certified managed packages), 100 fields per type, and a 10 million character budget where each text area reserves 255 characters regardless of use. Process Builder allows 15 Custom Metadata formula references per process. The author concludes that teams should treat business values as configuration, centralize them, and keep track of where each reference works and where it does not.