{"id":1612,"date":"2026-09-10T09:00:00","date_gmt":"2026-09-10T03:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/"},"modified":"2026-09-10T09:00:00","modified_gmt":"2026-09-10T03:30:00","slug":"apex-future-methods-explained","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/","title":{"rendered":"Apex Future Methods: @future Explained with Examples"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Apex Future Methods are the simplest way to run a piece of Apex in the background. You add the @future annotation to a static method, and Salesforce runs it later in its own transaction. They are perfect for small jobs, such as one callout after a save or one update that must happen in a separate transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you will learn the rules for @future, why parameters must be primitive, how callout=true works, and how future methods fix mixed DML errors. You will also see their limits and when Queueable is the better choice. It builds on <a href=\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-overview\/\">Asynchronous Apex<\/a>, <a href=\"https:\/\/swapnilzambare.com\/blog\/static-vs-instance-apex\/\">static vs instance Apex<\/a> and <a href=\"https:\/\/swapnilzambare.com\/blog\/testing-async-apex-starttest-stoptest\/\">testing async Apex<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Apex Future Methods?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Apex Future Methods are static methods marked @future that Salesforce queues and runs later. They must return void, and their parameters must be primitive types, such as Id, String or Integer, or collections of them. When you call one, the call returns at once, and the work happens after the current transaction commits.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of dropping a letter in a post box. You do not wait at the box until it arrives. You also cannot put a parcel with fragile items in it, only a flat envelope. Future methods are that post box: quick, simple, and limited in what they carry.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Apex Future Methods Matter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some small tasks cannot run in the current transaction. Here is why Apex Future Methods matter at Bright Path Tutors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, a trigger must notify a partner system, but triggers cannot make callouts.<\/li>\n\n<li>Also, activating a tutor&#8217;s user record while updating a course causes a mixed DML error.<\/li>\n\n<li>Next, some slow calculations should not delay the user&#8217;s save.<\/li>\n\n<li>Future methods need no extra class, just one annotation.<\/li>\n\n<li>Finally, a lot of existing code uses them, so you must understand them.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So Apex Future Methods are a quick fix for simple background work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Apex Future Methods Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Apex Future Methods follow a short flow. First, synchronous code calls the static @future method with primitive values, often record Ids. Next, Salesforce stores the request and the call returns at once. Then the current transaction finishes and commits. After that, the future method runs in a new transaction with async limits. Finally, it queries fresh data using the Ids, does its work, and ends without returning anything.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-1-1024x640.png\" alt=\"Apex Future Methods diagram showing call, queue, commit, run later, query and finish\" class=\"wp-image-1610\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-1-768x480.png 768w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-1-1536x960.png 1536w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-1-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">How a future method runs after the transaction commits.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">The @future Annotation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Mark a public or private static void method with @future. The method cannot return a value, because the caller has already moved on.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Primitive Parameters Only<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Parameters must be primitives, arrays of primitives, or collections of primitives. You cannot pass sObjects, because the record might change before the method runs. So pass Ids and query the records inside.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">callout=true<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add @future(callout=true) when the method calls another system over HTTP. Without it, callouts are not allowed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Limits and Rules<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can call up to 50 future methods in one transaction. Also, you cannot call a future method from another future method or from Batch Apex. Finally, the order in which future methods run is not guaranteed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Apex Future Methods Rules at a Glance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below sums up the main rules.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Rule<\/th><th>Detail<\/th><\/tr><\/thead><tbody><tr><td>Method type<\/td><td>static, returns void<\/td><\/tr><tr><td>Parameters<\/td><td>Primitives or collections of primitives<\/td><\/tr><tr><td>Callouts<\/td><td>Only with @future(callout=true)<\/td><\/tr><tr><td>Calls per transaction<\/td><td>Up to 50<\/td><\/tr><tr><td>Called from future or batch<\/td><td>Not allowed<\/td><\/tr><tr><td>Job Id returned<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Future Methods vs Queueable Apex<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below compares future methods with Queueable Apex.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>Future method<\/th><th>Queueable Apex<\/th><\/tr><\/thead><tbody><tr><td>Parameters<\/td><td>Primitives only<\/td><td>Any type, including sObjects<\/td><\/tr><tr><td>Job Id to track<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Chaining<\/td><td>Not possible<\/td><td>One child job per job<\/td><\/tr><tr><td>Code needed<\/td><td>One annotation<\/td><td>A class with execute<\/td><\/tr><tr><td>Best for<\/td><td>Small, simple tasks<\/td><td>Most new async work<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When to use which is simple. Use a future method for a tiny, one-off callout or mixed DML fix. Use Queueable for anything you need to track, chain or pass complex data to.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-2-1024x640.png\" alt=\"Apex Future Methods diagram comparing future methods and Queueable Apex\" class=\"wp-image-1611\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-2-768x480.png 768w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-2-1536x960.png 1536w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-diagram-2-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Future method vs Queueable Apex.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">A Real Apex Future Methods Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s use Apex Future Methods for two common jobs at Bright Path Tutors.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Fix a Mixed DML Error<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class TutorAccessService {\n\n    \/\/ Called after a course update; user changes need their own transaction\n    @future\n    public static void activateTutors(Set&lt;Id&gt; userIds) {\n        List&lt;User&gt; tutors = [SELECT Id, IsActive FROM User WHERE Id IN :userIds];\n        for (User u : tutors) {\n            u.IsActive = true;\n        }\n        update tutors;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Updating a setup object, such as User, and a normal object, such as Course__c, in one transaction causes a mixed DML error. So the course logic calls activateTutors with the user Ids, and the user update runs later in a separate transaction.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Make a Callout from a Trigger<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class PartnerNotifier {\n\n    @future(callout=true)\n    public static void notifyNewCourses(Set&lt;Id&gt; courseIds) {\n        for (Course__c c : [SELECT Id, Name, Fee__c FROM Course__c WHERE Id IN :courseIds]) {\n            HttpRequest req = new HttpRequest();\n            req.setEndpoint('callout:Partner_Catalog\/courses');\n            req.setMethod('POST');\n            req.setBody(JSON.serialize(c));\n            HttpResponse res = new Http().send(req);\n            System.debug(c.Name + ' sent, status ' + res.getStatusCode());\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The trigger handler calls notifyNewCourses with all new course Ids at once. Because of callout=true, the method can send HTTP requests. It queries the courses fresh, so it sends the saved values.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Call It Once per Transaction<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>when AFTER_INSERT {\n    PartnerNotifier.notifyNewCourses(Trigger.newMap.keySet());\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With Apex Future Methods, one call handles every course in the batch. So a Data Loader import of 200 courses uses one future call, not 200.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Check the Log<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a simplified debug log from the future method&#8217;s transaction.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CODE_UNIT_STARTED|PartnerNotifier.notifyNewCourses\nUSER_DEBUG|Apex Basics sent, status 201\nUSER_DEBUG|SOQL Basics sent, status 201<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The log appears as a separate entry, because the future method runs in its own transaction after the save.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Testing Apex Future Methods<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Call the code that triggers the future method between Test.startTest and Test.stopTest. Then the future method runs at stopTest, before your asserts. For callouts, also set a mock with Test.setMock first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Apex Future Methods<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Calling a future method inside a loop, once per record.<\/li>\n\n<li>Trying to pass sObjects as parameters.<\/li>\n\n<li>Calling a future method from Batch Apex or another future method.<\/li>\n\n<li>Forgetting callout=true for HTTP calls.<\/li>\n\n<li>Relying on the order in which future methods run.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Apex Future Methods<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pass a Set of Ids and query fresh data inside the method.<\/li>\n\n<li>Call each future method once per transaction with all records.<\/li>\n\n<li>Check System.isFuture() or System.isBatch() before calling, to avoid errors.<\/li>\n\n<li>Prefer Queueable for new code that needs tracking or chaining.<\/li>\n\n<li>Always test with Test.startTest and Test.stopTest.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Write a guard that calls PartnerNotifier.notifyNewCourses only when the code is not already running in a future or batch context. Hint: use System.isFuture() and System.isBatch().<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Interview Questions on Apex Future Methods<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Future methods are a classic interview topic. Here are the 21 questions asked most about Apex Future Methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Questions on Apex Future Methods<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: What is a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A static void method marked @future that Salesforce runs later in its own transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: What return type must a future method have?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">void.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: Why must future methods be static?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because they run in a new transaction with no object instance from the caller.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: What parameter types are allowed?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Primitives, arrays of primitives, and collections of primitives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: Why can&#8217;t you pass sObjects?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The record could change before the method runs, so you pass Ids and query fresh data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: How do you allow callouts in a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use @future(callout=true).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: How many future calls are allowed per transaction?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Up to 50.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code and Scenario Questions on Apex Future Methods<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: Can you call a future method from a batch class?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: Can a future method call another future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: How do you fix a mixed DML error with a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Move the setup object DML, such as user updates, into a future method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: How do you get the result of a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You cannot directly. It returns nothing and gives no job Id, so check the data it changed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: How do you test a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Call it between Test.startTest and Test.stopTest, then assert after stopTest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: How do you avoid calling a future method from a future context?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check System.isFuture() before calling it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: Do future methods run in a set order?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No. Order is not guaranteed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Questions on Apex Future Methods<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: Why is Queueable often better than future?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It accepts complex types, returns a job Id, supports chaining and finalizers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: Can a future method be called from a Visualforce constructor?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No. Future methods cannot be used in Visualforce getters, setters or constructors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: How do you pass complex data to a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Serialize it to a JSON string, then deserialize it inside the method, or switch to Queueable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: Do future methods count toward the daily async limit?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. They share the org&#8217;s daily asynchronous execution allowance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: What happens if a future method fails?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Its changes roll back and the error appears in Setup &gt; Apex Jobs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: Which limits apply inside a future method?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Asynchronous limits, such as 200 SOQL queries and 12 MB heap.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: When would you still choose a future method today?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a tiny, isolated callout or mixed DML fix where tracking is not needed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_invoking_future_methods.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Future Methods (Apex Developer Guide)<\/a><\/li>\n\n<li><a href=\"https:\/\/trailhead.salesforce.com\/content\/learn\/modules\/asynchronous_apex\/async_apex_future_methods\" target=\"_blank\" rel=\"noopener noreferrer\">Use Future Methods (Trailhead)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apex Future Methods are static void methods marked @future.<\/li>\n\n<li>They accept only primitive parameters, so pass Ids.<\/li>\n\n<li>Use @future(callout=true) for HTTP callouts.<\/li>\n\n<li>Up to 50 future calls are allowed per transaction.<\/li>\n\n<li>Prefer Queueable when you need tracking, chaining or complex data.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Queueable Apex is the modern choice for most background work. Next, read our guide to <a href=\"https:\/\/swapnilzambare.com\/blog\/queueable-apex-chaining-finalizers\/\">Queueable Apex with chaining and finalizers<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apex Future Methods are the simplest way to run a piece of Apex in the background. You add the @future annotation to a static&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1609,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[8,96],"tags":[98,112,26,91,7,97],"swapz_series":[],"class_list":["post-1612","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-salesforce","category-salesforce-developer","tag-apex","tag-async-apex","tag-intermediate","tag-interview-questions","tag-salesforce","tag-salesforce-developer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apex Future Methods: @future Explained Simply<\/title>\n<meta name=\"description\" content=\"Apex Future Methods explained simply: @future rules, primitive parameters, callout=true, mixed DML fixes, limits, testing and 21 interview Q&amp;A.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apex Future Methods: @future Explained Simply\" \/>\n<meta property=\"og:description\" content=\"Apex Future Methods explained simply: @future rules, primitive parameters, callout=true, mixed DML fixes, limits, testing and 21 interview Q&amp;A.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-10T03:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/922ac0131aaa7088c78c2cb1700e0c9a\"},\"headline\":\"Apex Future Methods: @future Explained with Examples\",\"datePublished\":\"2026-09-10T03:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/\"},\"wordCount\":1534,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/apex-future-methods-explained-featured.png\",\"keywords\":[\"Apex\",\"Async Apex\",\"Intermediate\",\"Interview Questions\",\"Salesforce\",\"Salesforce Developer\"],\"articleSection\":[\"Salesforce\",\"Salesforce Developer\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/\",\"name\":\"Apex Future Methods: @future Explained Simply\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/apex-future-methods-explained-featured.png\",\"datePublished\":\"2026-09-10T03:30:00+00:00\",\"description\":\"Apex Future Methods explained simply: @future rules, primitive parameters, callout=true, mixed DML fixes, limits, testing and 21 interview Q&A.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/apex-future-methods-explained-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/apex-future-methods-explained-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Apex Future Methods featured image: title card with an Apex code example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/apex-future-methods-explained\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apex Future Methods: @future Explained with Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/922ac0131aaa7088c78c2cb1700e0c9a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apex Future Methods: @future Explained Simply","description":"Apex Future Methods explained simply: @future rules, primitive parameters, callout=true, mixed DML fixes, limits, testing and 21 interview Q&A.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/","og_locale":"en_US","og_type":"article","og_title":"Apex Future Methods: @future Explained Simply","og_description":"Apex Future Methods explained simply: @future rules, primitive parameters, callout=true, mixed DML fixes, limits, testing and 21 interview Q&A.","og_url":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-09-10T03:30:00+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/922ac0131aaa7088c78c2cb1700e0c9a"},"headline":"Apex Future Methods: @future Explained with Examples","datePublished":"2026-09-10T03:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/"},"wordCount":1534,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-featured.png","keywords":["Apex","Async Apex","Intermediate","Interview Questions","Salesforce","Salesforce Developer"],"articleSection":["Salesforce","Salesforce Developer"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/","url":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/","name":"Apex Future Methods: @future Explained Simply","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-featured.png","datePublished":"2026-09-10T03:30:00+00:00","description":"Apex Future Methods explained simply: @future rules, primitive parameters, callout=true, mixed DML fixes, limits, testing and 21 interview Q&A.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/apex-future-methods-explained-featured.png","width":2400,"height":1260,"caption":"Apex Future Methods featured image: title card with an Apex code example"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/apex-future-methods-explained\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Apex Future Methods: @future Explained with Examples"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/922ac0131aaa7088c78c2cb1700e0c9a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=1612"}],"version-history":[{"count":0,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1612\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/1609"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=1612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=1612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=1612"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=1612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}