When writing triggers in Salesforce, context variables help us understand what is happening with the record during execution. Each event provides different variables that developers can use inside the trigger. Let’s break it down 👇 1️⃣ Before Insert Used before records are saved to the database. Available Variables: • Trigger.new • Trigger.newMap ❌ (not available) • Trigger.old ❌ • Trigger.oldMap ❌ 👉 Mainly used for validation or modifying field values before save. 2️⃣ After Insert Runs after records are saved to the database. Available Variables: • Trigger.new • Trigger.newMap 👉 Used when you need record Id or perform related operations. 3️⃣ Before Update Runs before updating records in the database. Available Variables: • Trigger.new • Trigger.old • Trigger.oldMap • Trigger.newMap 👉 Used for validations or updating values before saving changes. 4️⃣ After Update Runs after records are updated. Available Variables: • Trigger.new • Trigger.old • Trigger.newMap • Trigger.oldMap 👉 Useful for tracking changes between old and new values. 5️⃣ Before Delete Runs before deleting records. Available Variables: • Trigger.old • Trigger.oldMap 👉 Often used to prevent deletion or validate conditions. 6️⃣ After Delete Runs after records are deleted. Available Variables: • Trigger.old • Trigger.oldMap 👉 Used for cleanup or logging operations. 7️⃣ After Undelete Runs when records are restored from the recycle bin. Available Variables: • Trigger.new • Trigger.newMap 💡 Tip: Always check Trigger.isInsert, Trigger.isUpdate, Trigger.isDelete, and Trigger.isBefore / Trigger.isAfter to control your trigger logic. Save this post if you are learning Apex Triggers 🚀 Follow FlutterAnt - Salesforce for daily Salesforce learning #Salesforce #Apex #SalesforceDeveloper #Trailblazer #SalesforceLearning #ApexTrigger #SFDC #Flutterant
About us
Flutterant-Salesforce is a dedicated platform for Salesforce professionals, administrators, and developers to learn, grow, and excel in their careers. Through engaging and informative content, the page provides actionable tips, tutorials, and insights into Salesforce technologies, helping individuals and teams make the most of their Salesforce ecosystem. The platform is supported by Flutterant.com, a blog that dives deeper into Salesforce development, integrations, and best practices, along with an Instagram community of 5,000+ professionals actively engaging with the latest updates and resources. What Flutterant-Salesforce Offers: • Hands-on tutorials and guides on Apex, Lightning Web Components (LWC), CPQ, and integrations. • Updates on Salesforce releases, features, and tools. • Best practices for efficient Salesforce implementation and management. • Content designed to empower the Salesforce ecosystem and foster a collaborative community. Flutterant-Salesforce is here to make Salesforce easier to understand, accessible, and impactful for every professional.
- Website
-
https://flutterant.com
External link for FlutterAnt - Salesforce
- Industry
- Technology, Information and Internet
- Company size
- 1 employee
- Headquarters
- Hyderabad
- Type
- Self-Employed
- Founded
- 2020
Locations
-
Primary
Get directions
Hyderabad, IN
-
Get directions
Hyderabad, IN
Updates
-
Day 03/ 30: Follow FlutterAnt - Salesforce 30 Days of Apex Triggers — The Series! Whether you're a beginner trying to crack Salesforce development or a senior dev brushing up your skills — this series is for YOU! 💪 Every day for 30 days I'll be breaking down one Apex Trigger concept with real code, real scenarios & real interview questions. Day 3 just dropped — Save this post & Follow along so you don't miss a day! #Salesforce #Apex #SalesforceDeveloper #CRM #CodeTip [Salesforce, Apex, ,Salesforce Triggers, CodeTip]
-
Day 02/ 30: Follow FlutterAnt - Salesforce 30 Days of Apex Triggers — The Series! Whether you're a beginner trying to crack Salesforce development or a senior dev brushing up your skills — this series is for YOU! 💪 Every day for 30 days I'll be breaking down one Apex Trigger concept with real code, real scenarios & real interview questions. Day 2 just dropped — Save this post & Follow along so you don't miss a day! #salesforce #apextrigger #salesforcedeveloper #salesforceohana #apexcode #30daychallenge #salesforcedevelopment #learntocode #coding #trailhead #trailblazer #sfdc #salesforcedev [Salesforce, apex triggers, flutterant, salesforce developmenet]
-
Day 1/ 30: Follow FlutterAnt - Salesforce 30 Days of Apex Triggers — The Series! Whether you're a beginner trying to crack Salesforce development or a senior dev brushing up your skills — this series is for YOU! 💪 Every day for 30 days I'll be breaking down one Apex Trigger concept with real code, real scenarios & real interview questions. Day 1 just dropped — Save this post & Follow along so you don't miss a day! #salesforce #apextrigger #salesforcedeveloper #salesforceohana #apexcode #30daychallenge #salesforcedevelopment #learntocode #coding #trailhead #trailblazer #sfdc #salesforcedev [Salesforce, apex triggers, flutterant, salesforce developmenet]
-
I've been collecting Salesforce interview questions for months. Every question in this series comes from real interviews — shared by developers who got asked them at companies hiring Salesforce talent right now. Today's question is one that separates good developers from great ones. Think you know the answer? Comment "ANSWER" below and I'll personally reply with the full explanation! 👇 #Salesforce #SalesforceDeveloper #SalesforceInterview #SalesforceOhana #Trailblazer #TechInterview #SalesforceCareer #SFDC
-
#TriggerScenario Automate the assignment of an “Account Case Rating” to Accounts based on the number of closed Cases associated with account. Account Field: Account Case Rating (Accunt_Case_Rating__c: Number (2,2)) Account Case Rating = All closed case ratings/ number of closed cases. If P1 case is closed - 1 day – Rating Point 3, 2 days- Rating Point 2 and 3 or more – Rating point 1. If P2 case is closed - 2 day – Rating Point 3, 3 days- Rating Point 2 and 4 or more days – Rating point 1. If P3 case is closed - 3 day – Rating Point 3, 4 days- Rating Point 2 and 5 or more days– Rating point 1. give me trigger code with bulfied code bit change the question Follow FlutterAnt - Salesforce for more real Scenarios to practice for your next Role #salesforce #salesforcePractice #triggersscenarios
-
#Trigger_scenario If any user tries to modify an Account record within 2 minutes of the last modification, block the update and show an error. Follow FlutterAnt - Salesforce for daily Salesforce concepts 👨💻⚡ #Salesforce #Apex #SalesforceTriggers #DeveloperLife #SalesforceCommunity #techcontent
-
#InterviewQuestion Write a trigger to prevent the deletion of any Account if more than one Contact is associated with the Account. Follow FlutterAnt - Salesforce for more Insights
-
#InterviewQuestion Write a Batch Apex class to update a Contact field with the count of Closed Won Opportunities in the current quarter. Follow FlutterAnt - Salesforce for more salesforce content
-
Salesforce just made PDF generation way simpler. With Spring ’26, you can now generate professional PDFs straight from Apex using the new Blob.toPdf() method. Follow FlutterAnt - Salesforce for more Salesforce content #salesforce #apex #spring26 #salesforcereleasenotes