{"id":211,"date":"2022-07-18T10:00:00","date_gmt":"2022-07-18T04:30:00","guid":{"rendered":""},"modified":"2023-07-22T14:59:01","modified_gmt":"2023-07-22T09:29:01","slug":"asynchronous-apex-in-salesforce-future-methods","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/","title":{"rendered":"Asynchronous Apex in Salesforce : Future Methods"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Asynchronous Apex in Salesforce : Future Methods<\/h1>\n\n\n\n<p>Future Apex is used to run processes in a separate thread, at a later time when system resources become available.<\/p>\n\n\n\n<p>A <b>future method<\/b> runs in the background, asynchronously. You can call a future method for executing long-running operations, such as callouts to external Web services or any operation you\u2019d like to run in its own thread, on its own time. You can also use future methods to isolate DML operations on different sObject types to prevent the mixed DML error. Each future method is queued and executes when system resources become available. That way, the execution of your code doesn\u2019t have to wait for the completion of a long-running operation. A benefit of using future methods is that some governor limits are higher, such as SOQL query limits and heap size limits. You can call 50 future methods per transaction.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b><i>Things to Remember:<\/i><\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Methods are annotated with&nbsp;<b>@future<\/b>&nbsp;annotation.<\/li>\n\n\n\n<li>Use the future annotation to specify that these methods that are executed asynchronously.<\/li>\n\n\n\n<li>Methods with future annotation must be&nbsp;<b>static<\/b>&nbsp;methods.<\/li>\n\n\n\n<li>Methods with future annotation can only return a&nbsp;<b>void<\/b>&nbsp;type.<\/li>\n\n\n\n<li>The specified parameters must be <b>primitive data types<\/b>, arrays of primitive data types, or collections of primitive data types.<\/li>\n\n\n\n<li>Future methods are <b>not guaranteed<\/b> to execute in the same order as they are called.<\/li>\n\n\n\n<li>When using future methods, it\u2019s also possible that two future methods could run concurrently, which could result in record locking and a nasty runtime error if the two methods were updating the same record.<\/li>\n\n\n\n<li>The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types; future methods can\u2019t take objects as arguments.<\/li>\n\n\n\n<li>Future methods won\u2019t necessarily execute in the same order they are called. In addition, it\u2019s possible that <b>two future<\/b> methods could run concurrently, which could result in record locking if the two methods were updating the same record.<\/li>\n\n\n\n<li>Future methods can\u2019t be used in Visualforce controllers in <b>getMethodName(), setMethodName()<\/b>, nor in the constructor.<\/li>\n\n\n\n<li>You\u2019re limited to <b>50 future<\/b> calls per Apex invocation, and there\u2019s an additional limit on the number of calls in a 24-hour period. For more information on limits, see the link below.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><i><span style=\"font-size: medium;\"><b># Future Method Syntax:<\/b><\/span><\/i><\/h3>\n\n\n\n<p>Future methods must be static methods, and can only return a void type. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types. Notably, future methods can\u2019t take standard or custom objects as arguments. A common pattern is to pass the method a List of record IDs that you want to process asynchronously.<\/p>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<div style=\"color: #1e1e1e; font-size: 16px;\">\n<pre><code>public class MyClass {\n  <b>@future<\/b>\n  public static void myFutureMethod(List&lt;Id&gt; recordIds) {\n    List&lt;Account&gt; accounts = [Select Id, Name from Account Where Id IN :recordIds];\n    \/\/ Your code here\n  }\n}\n<\/code><\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">How to define a method as future?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the annotation @future at the top of the method.<\/li>\n\n\n\n<li>Future methods must be always static and have a return type as void.<\/li>\n<\/ul>\n\n\n\n<p>Public class AsyncClass{<\/p>\n\n\n\n<p>@future<\/p>\n\n\n\n<p>Public static void asyncMethod() {<\/p>\n\n\n\n<p>\/\/future code goes here<\/p>\n\n\n\n<p>&nbsp;&nbsp; &nbsp;}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">What is a Mixed DML Exception?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If we perform DML operation on standard\/custom object and global objects(User, UserRole, Group, GroupMember, Permission Set, etc\u2026) in same transaction this error will come.<\/li>\n\n\n\n<li>To avoid this error, we should perform DML operation on standard\/custom object records in a different transaction.<\/li>\n\n\n\n<li>In general all the apex classes and apex triggers execute synchronously (execute immediately).<\/li>\n\n\n\n<li>If we perform DML operation on standard\/custom object records asynchronously (execute in future context), we can avoid MIXED-DML-OPERATION error.<\/li>\n\n\n\n<li>To execute logic asynchronously keep the logic in an apex method (in a separate apex class, not in same apex trigger) which is decorated with @future annotation.<\/li>\n<\/ul>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">How to resolve Mixed DML Exception?<\/h3>\n\n\n\n<p><i><u><b>Synchronous Class<\/b><\/u><\/i><\/p>\n\n\n\n<p>public class SynchronusClass {<\/p>\n\n\n\n<p>&nbsp; &nbsp; public static void synchronusMethod() {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; PermissionSet perSet = new PermissionSet();<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; perSet.Label = &#8216;Apex Set&#8217;;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; perSet.Name = &#8216;ApexSet&#8217;;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; insert perSet;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; AsynchronusClass.setupNonSetup();<\/p>\n\n\n\n<p>&nbsp; &nbsp; }<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p><i><u><b>Asynchronous Class<\/b><\/u><\/i><\/p>\n\n\n\n<p>public class AsynchronusClass {<\/p>\n\n\n\n<p>&nbsp; &nbsp; @future<\/p>\n\n\n\n<p>&nbsp; &nbsp; public static void setupNonSetup() {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; Opportunity opp = new Opportunity();<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; opp.Name = &#8216;Test Opp&#8217;;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; opp.StageName = &#8216;Prospecting&#8217;;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; opp.CloseDate = System.today();<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; insert opp;<\/p>\n\n\n\n<p>&nbsp; &nbsp; }<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">How to track future methods?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Setup -&gt; Environments -&gt; Jobs -&gt; Apex Jobs.<\/li>\n\n\n\n<li>We can track our future methods here.<\/li>\n\n\n\n<li>See the status and also track method name.<\/li>\n\n\n\n<li>Get Id of our future method from here.<\/li>\n<\/ul>\n\n\n\n<p><i><u><b>Using query<\/b><\/u><\/i><\/p>\n\n\n\n<p>SELECT Id, JobType, ApexClassId, Status, NumberOfErrors, MethodName FROM AsyncApexJob where id = &#8216;7075g00005cUGj7&#8217;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Either run the query in query editor or in apex class.<\/li>\n\n\n\n<li>Get the id from Apex Jobs or query all the records from AsyncApexJob object.<\/li>\n<\/ul>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">What is System.isFuture()?<\/h3>\n\n\n\n<p>Use System.isFuture() when we want any apex code to execute only at the time of future call. System.isFuture() return a boolean value (True or False).<\/p>\n\n\n\n<p><b><i><u>SynchronusClass.apxc<br><br><\/u><\/i><\/b><\/p>\n\n\n\n<p>public class SynchronusClass {<\/p>\n\n\n\n<p>&nbsp; &nbsp; public static void synchronusMethod() {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; if(System.isFuture()) {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.debug(&#8216;Run this at future&#8217;);<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; } else {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.debug(&#8216;Run this when future is not running&#8217;);<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \/\/AsynchronusClass.setupNonSetup();<\/p>\n\n\n\n<p>&nbsp; &nbsp; }<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p><u><i><b>AsynchronusClass.apxc<\/b><\/i><\/u><\/p>\n\n\n\n<p>public class AsynchronusClass {<\/p>\n\n\n\n<p>&nbsp; &nbsp; @future<\/p>\n\n\n\n<p>&nbsp; &nbsp; public static void setupNonSetup() {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; SynchronusClass.synchronusMethod();<\/p>\n\n\n\n<p>&nbsp; &nbsp; }<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is @future(callout=true)?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To make a Web service callout to an external service or API, you create an Apex class with a future method that is marked with (callout=true).<\/li>\n\n\n\n<li>If we do not use (callout=true) we\u2019ll get the below error at the time of callouts:-<\/li>\n\n\n\n<li>System.CalloutException: Callout not allowed from this future method. Please enable callout by annotating the future method. eg: @Future(callout=true)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Advantages and Disadvantages of Future Methods:<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Advantages of @future annotation:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We can make a callout from Trigger using @future annotation<\/li>\n\n\n\n<li>When there are CPU time limit exceptions and SOQL 101 Exceptions we can use @future and push the business logic that&#8217;s not of that priority to get executed in Asynchronous mode.<\/li>\n\n\n\n<li>We can increase the request timeout using @future annotation<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Disadvantages with @future annotation:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We cannot invoke a future method within another @future method<\/li>\n\n\n\n<li>Future methods cannot be used in Batch Apex.<\/li>\n\n\n\n<li>@future method cannot return any data back.<\/li>\n\n\n\n<li>We cannot pass complex data types(List, Set, and Map), custom data types to a future method. We always have to send primitive data types.<\/li>\n\n\n\n<li>You can call up to 50 @future methods per transaction.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: large;\">Future Method &#8211; Video Tutorial:<\/span><\/h3>\n\n\n\n<p># Resources:<\/p>\n\n\n\n<p># Future Method&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Asynchronous Apex in Salesforce : Future Methods Future Apex is used to run processes in a separate thread, at a later time when system resources become available. A future method runs in the background, asynchronously. You can call a future method for executing long-running operations, such as callouts to external Web services or any operation&#8230;<\/p>\n","protected":false},"author":2,"featured_media":83,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,15],"tags":[],"class_list":["post-211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apex","category-asynchronous"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Asynchronous Apex in Salesforce : Future Methods - Swapnil SFDC | Salesforce Blog<\/title>\n<meta name=\"description\" content=\"Asynchronous Apex in Salesforce : Future Methods. Future:Apex is used to run processes in a separate thread, at a later time when system resources become available.\" \/>\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\/asynchronous-apex-in-salesforce-future-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Asynchronous Apex in Salesforce : Future Methods - Swapnil SFDC | Salesforce Blog\" \/>\n<meta property=\"og:description\" content=\"Asynchronous Apex in Salesforce : Future Methods. Future:Apex is used to run processes in a separate thread, at a later time when system resources become available.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil SFDC | Salesforce Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-18T04:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-22T09:29:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"525\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SwapnilZambare7\" \/>\n<meta name=\"twitter:site\" content=\"@SwapnilZambare7\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/\",\"url\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/\",\"name\":\"Asynchronous Apex in Salesforce : Future Methods - Swapnil SFDC | Salesforce Blog\",\"isPartOf\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png\",\"datePublished\":\"2022-07-18T04:30:00+00:00\",\"dateModified\":\"2023-07-22T09:29:01+00:00\",\"author\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45\"},\"description\":\"Asynchronous Apex in Salesforce : Future Methods. Future:Apex is used to run processes in a separate thread, at a later time when system resources become available.\",\"breadcrumb\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#primaryimage\",\"url\":\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png\",\"contentUrl\":\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png\",\"width\":750,\"height\":525,\"caption\":\"Swapnil SFDC Salesforce Blog\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/swapnilzambare.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Asynchronous Apex in Salesforce : Future Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#website\",\"url\":\"https:\/\/swapnilzambare.com\/blog\/\",\"name\":\"Swapnil SFDC | Salesforce Blog\",\"description\":\"Hey trailblazers, Welcome to Swapnil SFDC world.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45\",\"name\":\"Swapnil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g\",\"caption\":\"Swapnil\"},\"url\":\"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Asynchronous Apex in Salesforce : Future Methods - Swapnil SFDC | Salesforce Blog","description":"Asynchronous Apex in Salesforce : Future Methods. Future:Apex is used to run processes in a separate thread, at a later time when system resources become available.","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\/asynchronous-apex-in-salesforce-future-methods\/","og_locale":"en_US","og_type":"article","og_title":"Asynchronous Apex in Salesforce : Future Methods - Swapnil SFDC | Salesforce Blog","og_description":"Asynchronous Apex in Salesforce : Future Methods. Future:Apex is used to run processes in a separate thread, at a later time when system resources become available.","og_url":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/","og_site_name":"Swapnil SFDC | Salesforce Blog","article_published_time":"2022-07-18T04:30:00+00:00","article_modified_time":"2023-07-22T09:29:01+00:00","og_image":[{"width":750,"height":525,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png","type":"image\/png"}],"author":"Swapnil","twitter_card":"summary_large_image","twitter_creator":"@SwapnilZambare7","twitter_site":"@SwapnilZambare7","twitter_misc":{"Written by":"Swapnil","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/","url":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/","name":"Asynchronous Apex in Salesforce : Future Methods - Swapnil SFDC | Salesforce Blog","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png","datePublished":"2022-07-18T04:30:00+00:00","dateModified":"2023-07-22T09:29:01+00:00","author":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45"},"description":"Asynchronous Apex in Salesforce : Future Methods. Future:Apex is used to run processes in a separate thread, at a later time when system resources become available.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/08\/sflogo-e1688320096934.png","width":750,"height":525,"caption":"Swapnil SFDC Salesforce Blog"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-in-salesforce-future-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Asynchronous Apex in Salesforce : Future Methods"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil SFDC | Salesforce Blog","description":"Hey trailblazers, Welcome to Swapnil SFDC world.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45","name":"Swapnil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g","caption":"Swapnil"},"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/211","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":3,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":307,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/211\/revisions\/307"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/83"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}