---
title: "#apex-development articles | Hashnode"
description: "Explore 2 articles tagged #apex-development on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/apex-development"
---

Tag

# #apex-development

2 posts · 0 followers

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/apex-test-data-factories-patterns-that-prevent-flaky-tests/6a53c674bda226edb21caefd)

### [Apex Test Data Factories: Patterns That Prevent Flaky Tests](https://sapotacorpvn.hashnode.dev/apex-test-data-factories-patterns-that-prevent-flaky-tests?utm_source=hashnode&utm_medium=feed)

Every Apex test class needs to create its own data. Done badly, the test setup is duplicated across hundreds of files, breaks when a required field is added, and produces flaky tests that pass in one sandbox and fail in another.

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/apex-test-data-factories-patterns-that-prevent-flaky-tests?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/apex-callouts-to-external-systems-timeouts-retries-idempotency/6a53c5a7b98c9bd29bc96851)

### [Apex Callouts to External Systems: Timeouts, Retries, Idempotency](https://sapotacorpvn.hashnode.dev/apex-callouts-to-external-systems-timeouts-retries-idempotency?utm_source=hashnode&utm_medium=feed)

Salesforce calls out to NetSuite, Stripe, Slack, internal APIs. Most production Apex callout code is missing at least one of three things: a sensible timeout, retry on transient failure, or idempotency. All three matter when the external sy

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/apex-callouts-to-external-systems-timeouts-retries-idempotency?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/async-apex-selection-queueable-batch-future-or-scheduled/6a53c6c76ed9fb569202092c)

### [Async Apex Selection: Queueable, Batch, Future, or Scheduled](https://sapotacorpvn.hashnode.dev/async-apex-selection-queueable-batch-future-or-scheduled?utm_source=hashnode&utm_medium=feed)

Salesforce ships four async Apex patterns. Each has a specific shape, a specific governor limit profile, and a specific failure mode. Choosing the wrong one produces code that works at low volume and fails at scale.

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/async-apex-selection-queueable-batch-future-or-scheduled?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/httpcalloutmock-test-apex-callouts-without-real-services/6a53c56bdb7ec1353c05c188)

### [HttpCalloutMock: Test Apex Callouts Without Real Services](https://sapotacorpvn.hashnode.dev/httpcalloutmock-test-apex-callouts-without-real-services?utm_source=hashnode&utm_medium=feed)

Apex tests cannot make real HTTP callouts. The platform requires mocks. The right mock infrastructure produces fast, deterministic tests that exercise success, timeout, retry, and error paths without flakiness.

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/httpcalloutmock-test-apex-callouts-without-real-services?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/apex-queueable-chaining-state-across-async-invocations/6a53c51941361a4465e6b87a)

### [Apex Queueable Chaining: State Across Async Invocations](https://sapotacorpvn.hashnode.dev/apex-queueable-chaining-state-across-async-invocations?utm_source=hashnode&utm_medium=feed)

A multi-step async workflow involves processing 100K records across five distinct stages. Each stage is too much for one transaction. Queueable chaining keeps the work going across invocations without losing state, governor limits, or the a

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/apex-queueable-chaining-state-across-async-invocations?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/the-75-percent-apex-coverage-myth-lines-covered-logic-untested/6a53c51141361a4465e6a8c6)

### [The 75 Percent Apex Coverage Myth: Lines Covered, Logic Untested](https://sapotacorpvn.hashnode.dev/the-75-percent-apex-coverage-myth-lines-covered-logic-untested?utm_source=hashnode&utm_medium=feed)

Salesforce requires 75 percent code coverage to deploy to production. Most teams treat the number as a goal. The number is the floor. Hitting it with tests that have no meaningful assertions produces an org full of code nobody trusts.

8 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/the-75-percent-apex-coverage-myth-lines-covered-logic-untested?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/apex-crud-and-fls-securityenforced-vs-stripinaccessible/6a53c4af7370acb718591fae)

### [Apex CRUD and FLS: SECURITY\_ENFORCED vs stripInaccessible](https://sapotacorpvn.hashnode.dev/apex-crud-and-fls-securityenforced-vs-stripinaccessible?utm_source=hashnode&utm_medium=feed)

Apex code that reads or writes records can bypass field-level security and CRUD permissions by default. Two patterns enforce these checks, each with different ergonomics and audit implications. Picking the right one matters for AppExchange

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/apex-crud-and-fls-securityenforced-vs-stripinaccessible?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/apex-sharing-modes-with-without-inherited-sharing/6a53c43741361a4465e4c811)

### [Apex Sharing Modes: With, Without, Inherited Sharing](https://sapotacorpvn.hashnode.dev/apex-sharing-modes-with-without-inherited-sharing?utm_source=hashnode&utm_medium=feed)

Every Apex class runs in one of three sharing modes. The default is the most permissive. Most production orgs have at least one class running with bypass when it should respect sharing. The fix is a one-keyword change and a code review disc

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/apex-sharing-modes-with-without-inherited-sharing?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/dml-partial-success-in-apex-databasesaveresult-and-savepoints/6a53c3bf7370acb71858031c)

### [DML Partial Success in Apex: Database.SaveResult and Savepoints](https://sapotacorpvn.hashnode.dev/dml-partial-success-in-apex-databasesaveresult-and-savepoints?utm_source=hashnode&utm_medium=feed)

A bulk update on 5,000 records. Twelve fail validation. Should the other 4,988 commit, or should the whole batch roll back? The answer depends on the business case, and Apex offers three patterns to control it.

7 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/dml-partial-success-in-apex-databasesaveresult-and-savepoints?utm_source=hashnode&utm_medium=feed)

[SapotaCorp](https://hashnode.com/@sapotacorpvn) · [Jul 12](https://hashnode.com/posts/master-detail-vs-lookup-salesforce-relationship-decision/6a53c39172b7c2ef215595e4)

### [Master-Detail vs Lookup: Salesforce Relationship Decision](https://sapotacorpvn.hashnode.dev/master-detail-vs-lookup-salesforce-relationship-decision?utm_source=hashnode&utm_medium=feed)

Two custom objects, one with a parent reference to the other. Master-detail or lookup? The choice is permanent for practical purposes and affects sharing, rollups, cascades, and migration paths. Five criteria decide it cleanly.

8 min read · [sapotacorpvn.hashnode.dev](https://sapotacorpvn.hashnode.dev/master-detail-vs-lookup-salesforce-relationship-decision?utm_source=hashnode&utm_medium=feed)
