Custom Metadata Types vs Custom Settings vs Custom Labels 💬 In plain words: Three lookalikes: Custom Metadata = configuration that DEPLOYS with your code (best for app settings). Custom Settings = org/user-specific values, changeable at runtime (hierarchy type is great for bypass switches). Custom Labels = translatable text for the UI. 📌 Example: API endpoint URLs per environment → Custom Metadata (deploys with code, sandbox vs prod values). A 'Bypass_Automation__c' checkbox an admin flips during data load → hierarchy Custom Setting. The word 'Submit' translated to Hindi → Custom Label. 🎬 Real-Life Example: The Fee Table Trapped Inside Code Skyline charges a different delivery fee per city. Apex needs those rates on every booking. The Old/Bad Way: if (city == 'Delhi') fee = 50. Else if (city == 'Mumbai') fee = 65. … Every rate change is a code change, a test run, and a deployment. Why this is bad: Business data is trappe...
Here's a cheat sheet for Apex triggers with code examples: 1. Trigger Structure: trigger TriggerName on ObjectName (trigger_events) { // Trigger logic and code here } 2. Trigger Events: before insert: Fires before records are inserted into the database. before update: Fires before records are updated in the database. before delete: Fires before records are deleted from the database. after insert: Fires after records are inserted into the database. after update: Fires after records are updated in the database. after delete: Fires after records are deleted from the database.