Test failures increase because tests become indirectly coupled to shared logic. A small change in automation can affect many tests that weren’t designed to account for it. Over time, tests also accumulate assumptions that no longer hold true as the system evolves. Refactoring tests to be more isolatRead more
Test failures increase because tests become indirectly coupled to shared logic. A small change in automation can affect many tests that weren’t designed to account for it.
Over time, tests also accumulate assumptions that no longer hold true as the system evolves.
Refactoring tests to be more isolated and behavior-focused reduces brittleness.
Takeaway: Growing systems require evolving test strategies.
Why does my LWC not refresh after record update?
The wired data is cached and not refreshed explicitly. Problem Explanation Salesforce caches wire adapters. UI won’t update unless data is refreshed using refreshApex. Root Cause(s) 1. Missing refreshApex 2. Using imperative Apex without state updates 3. LDS cache not refreshed Step-by-Step SolutionRead more
The wired data is cached and not refreshed explicitly.
Problem Explanation
Salesforce caches wire adapters. UI won’t update unless data is refreshed using
refreshApex.Root Cause(s)
1. Missing
refreshApex2. Using imperative Apex without state updates
3. LDS cache not refreshed
Step-by-Step Solution
1. Store wired result reference
2. Call
refreshApex(this.wiredResult)3. Use
getRecordNotifyChangeif using LDSEdge Cases & Variations
1. Cacheable Apex requires explicit refresh
2. Cross-component updates need LMS
Common Mistakes to Avoid
1. Expecting auto-refresh
2. Re-rendering component manually
See lessWhy does my Apex HTTP callout fail with “Callout not allowed from this context”?
Callouts are not permitted from synchronous trigger execution. Problem Explanation Salesforce restricts HTTP callouts from certain contexts, including standard triggers and some Flow actions. Root Cause(s) 1. Callout inside trigger 2. Callout inside non-async Apex 3. Mixed DML before callout Step-byRead more
Callouts are not permitted from synchronous trigger execution.
Problem Explanation
Salesforce restricts HTTP callouts from certain contexts, including standard triggers and some Flow actions.
Root Cause(s)
1. Callout inside trigger
2. Callout inside non-async Apex
3. Mixed DML before callout
Step-by-Step Solution
1. Move callout logic to
@future(callout=true)or Queueable2. Invoke async method from trigger
3. Ensure no DML before callout in same transaction
Edge Cases & Variations
1. Platform Events allow callouts asynchronously
2. Named Credentials simplify auth handling
Common Mistakes to Avoid
1. Calling APIs directly from triggers
2. Ignoring transaction order
See lessWhy does my Salesforce report not show newly created records?
The report filter excludes recent data or uses the wrong date field. Problem Explanation Reports rely heavily on date filters and ownership context. Root Cause(s) 1. “Created Date” filter set incorrectly 2. Record owner mismatch 3. Private sharing model Step-by-Step Solution 1. Adjust date filter toRead more
The report filter excludes recent data or uses the wrong date field.
Problem Explanation
Reports rely heavily on date filters and ownership context.
Root Cause(s)
1. “Created Date” filter set incorrectly
2. Record owner mismatch
3. Private sharing model
Step-by-Step Solution
1. Adjust date filter to “All Time”
2. Verify record ownership
3. Check report running user
Edge Cases & Variations
1. Dashboard running user affects visibility
2. Joined reports may filter differently
Common Mistakes to Avoid
1. Assuming admin sees everything
2. Ignoring sharing rules
See lessWhy are my Salesforce reports showing incorrect totals?
The report summary level or field type is misconfigured. Problem Explanation Reports aggregate data based on grouping and field data types. Text fields won’t sum correctly. Root Cause(s) 1. Formula fields returning text 2. Incorrect grouping level 3. Filters excluding records Step-by-Step Solution 1Read more
The report summary level or field type is misconfigured.
Problem Explanation
Reports aggregate data based on grouping and field data types. Text fields won’t sum correctly.
Root Cause(s)
1. Formula fields returning text
2. Incorrect grouping level
3. Filters excluding records
Step-by-Step Solution
1. Verify field data type (Number/Currency)
2. Check report grouping hierarchy
3. Recalculate summaries
Edge Cases & Variations
1. Joined reports calculate separately
2. Row-level formulas override summaries
Common Mistakes to Avoid
1. Summarizing formula text fields
2. Ignoring report filters
See lessWhy does my Salesforce API call return “INVALID_SESSION_ID”?
The access token or session ID has expired or is invalid. Problem Explanation Salesforce API sessions expire or become invalid when reused incorrectly or when IP relaxations are misconfigured. Root Cause(s) 1. Expired OAuth token 2. Incorrect login endpoint 3. IP restriction mismatch Step-by-Step SoRead more
The access token or session ID has expired or is invalid.
Problem Explanation
Salesforce API sessions expire or become invalid when reused incorrectly or when IP relaxations are misconfigured.
Root Cause(s)
1. Expired OAuth token
2. Incorrect login endpoint
3. IP restriction mismatch
Step-by-Step Solution
1. Re-authenticate using OAuth refresh token
2. Verify correct login URL (
loginvstest)3. Check Connected App policies
Edge Cases & Variations
1. Sandbox tokens don’t work in production
2. JWT flows require correct certificate setup
Common Mistakes to Avoid
1. Hardcoding session IDs
2. Mixing sandbox and prod credentials
See lessWhy does my Salesforce Flow ignore my formula condition?
The formula evaluates to null or uses incorrect data types. Problem Explanation Flow formulas are strict. Any null value in a logical formula can cause unexpected results. Root Cause(s) 1. Null fields in formula 2. Text vs Number comparison 3. Incorrect operator usage Step-by-Step Solution 1. Wrap fRead more
The formula evaluates to null or uses incorrect data types.
Problem Explanation
Flow formulas are strict. Any null value in a logical formula can cause unexpected results.
Root Cause(s)
1. Null fields in formula
2. Text vs Number comparison
3. Incorrect operator usage
Step-by-Step Solution
1. Wrap fields with
ISBLANK()checks2. Ensure consistent data types
3. Test formula independently using debug
Edge Cases & Variations
1. Checkbox fields behave differently in formulas
2. Picklist comparisons require
TEXT()Common Mistakes to Avoid
1. Assuming null equals false
2. Comparing picklists directly
See lessWhy does my Salesforce test class exceed CPU time limit?
The test executes inefficient logic or triggers excessive automation. Problem Explanation Salesforce enforces strict CPU limits even during test execution. Root Cause(s) 1. Large loops with DML 2. Trigger recursion 3. Complex Flows invoked during tests Step-by-Step Solution 1. Reduce test data volumRead more
The test executes inefficient logic or triggers excessive automation.
Problem Explanation
Salesforce enforces strict CPU limits even during test execution.
Root Cause(s)
1. Large loops with DML
2. Trigger recursion
3. Complex Flows invoked during tests
Step-by-Step Solution
1. Reduce test data volume
2. Disable unnecessary automation in tests
3. Optimize Apex logic
Edge Cases & Variations
1. Managed packages add hidden overhead
2. CI environments are stricter
Common Mistakes to Avoid
1. Creating thousands of records
2. Ignoring Flow-triggered logic
See less