Enabling Record Locking and Unlocking in Apex: A Quick Guide

Ever run into this frustrating little gem in your Salesforce deployment or Apex tests? System.NoAccessException: Apex approval lock/unlock API preference not enabled Yeah, us too. If you’re trying to use Approval.lock(record) or Approval.unlock(record) in Apex, Salesforce needs you to explicitly enable the feature first. Here’s how to do it — with a side of clarity […]

Recent Comments

No comments to show.