Skip to content

aldoforce/apex-db-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

apex-db-manager

Apex database layer for managed packages to simplify and enforce FLS

Overview

When writing a Managed Package, if you want to reach the AppExchange certified condition you will need to take special care with some code features like FLS.

Usually that requirement came up at the final stages of development and might have a several impact on the rollout date. Let me introduce this little DML class wrapper that enforce FLS with minimal impact on your code.

Usage

  1. Deploy this DB class into your packing/dev org
  2. Search in your whole code base for insert/update/upsert DML operations and substitute them to use DB.inserter/DB.updater/DB.upserter.
  3. There is no step 3, just save everything and run your test cases

Example

Original code

Account a = new Account(
	name = 'Nakatomi Inc'
);
insert a;

Updated code enforcing FLS

Account a = new Account(
	name = 'Nakatomi Inc'
);
DB.inserter(a);

Quick Install

Use the Github Salesforce Deploy Tool link here while logged into your target org and follow instructions.

About

Apex database layer for managed packages to simplify and enforce FLS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages