Salesforce Decode
Salesforcedecode
Back to questions
ApexIntermediatetriggersmigrationbulkification

Handle trigger bypass hierarchy for data migration weekend cutover

Real World Scenario

Weekend cutover loads 3M historical records. Triggers firing enrichment callouts and emails would overwhelm org and external systems.

Expected Answer

• Hierarchy Custom Setting Trigger_Bypass__c per object or global • Migration integration user profile with bypass enabled in setting • Cutover runbook: enable bypass, load, disable bypass, run reconciliation batch • Post-load batch enqueues deferred enrichment for records needing it • Verify bypass disabled after cutover—alert if still enabled Monday • Test bypass does not affect normal user transactions in same test org • Document which triggers respect bypass flag in trigger framework

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Main difference: use case and scale. Hierarchy Custom Setting Trigger_Bypass__c per object or global. Migration integration user profile with bypass enabled in setting. Pick based on your integration pattern and team capability. Migration bypass is controlled outage of automation—runbook and auto-alert on forgotten bypass flag. Balance speed of delivery with maintainability.

Architect Perspective

Migration bypass is controlled outage of automation—runbook and auto-alert on forgotten bypass flag.