<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ak on Medium]]></title>
        <description><![CDATA[Stories by Ak on Medium]]></description>
        <link>https://medium.com/@akash.techmail?source=rss-6fbbfdf445aa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*2cCHsT8JgGJSLkWL</url>
            <title>Stories by Ak on Medium</title>
            <link>https://medium.com/@akash.techmail?source=rss-6fbbfdf445aa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 23:11:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akash.techmail/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SOSL]]></title>
            <link>https://medium.com/@akash.techmail/sosl-0f84fb911c35?source=rss-6fbbfdf445aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f84fb911c35</guid>
            <category><![CDATA[sales-development]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[soql]]></category>
            <category><![CDATA[sosl]]></category>
            <dc:creator><![CDATA[Ak]]></dc:creator>
            <pubDate>Wed, 26 Aug 2026 06:42:03 GMT</pubDate>
            <atom:updated>2026-08-26T06:47:18.085Z</atom:updated>
            <content:encoded><![CDATA[<p>salesforce object search language is used for search the field value across multiple object in a single time</p><p>easy to search and easy syntax</p><ol><li><strong>FIND </strong>— it is used to find the value , Always we need to use this <strong>Find </strong>Keyword in the beginning of the search <strong>EX-FIND {John Smith}</strong></li><li><strong>{“ “}</strong> this curly bracket is used to mention what word we need to search we can mention inside this we can search multiple words and we can use And,OR operator also inside this curly bracket <strong>EX-FIND {(John AND Smith) OR Kumar} IN NAME FIELDS RETURNING Contact(FirstName, LastName)</strong></li><li><strong>IN </strong>— it is used next of the value bracket to mention which field they need to search</li><li><strong>All</strong>,<strong>Name</strong>,<strong>Email</strong>,<strong>Phone </strong>— this are the keywords only need to use next of the <strong>IN </strong>keyword</li><li><strong>Fields </strong>— this is the keyword always we need to use next of that anyone of the keyword</li><li><strong>RETURNING —</strong> this keyword we need to use next to fields keyword</li></ol><blockquote>After the returning keyword Always we need to mention the object what the objects it need to search</blockquote><pre>FIND {Smith}<br>IN ALL FIELDS<br>RETURNING <br>   Contact(FirstName, LastName, Email WHERE MailingCity=&#39;Chennai&#39; ORDER BY LastName ASC LIMIT 10),<br>   Lead(FirstName, LastName, Company WHERE Status=&#39;Open&#39; LIMIT 5),<br>   Account(Name, Industry LIMIT 5)<br>WITH DIVISION = &#39;Global&#39;<br>UPDATE TRACKING</pre><pre>String soslFindClause = &#39;Wingo OR SFDC&#39;;<br>List&lt;List&lt;sObject&gt;&gt; searchList = [FIND :soslFindClause IN ALL FIELDS<br>                    RETURNING Account(Name),Contact(FirstName,LastName,Department)];<br>List&lt;Account&gt; searchAccounts = (List&lt;Account&gt;)searchList[0];<br>ListContact&gt; searchContacts = (List&lt;Contact&gt;)searchList[1];<br>System.debug(&#39;Found the following accounts.&#39;);<br>for (Account a : searchAccounts) {<br>    System.debug(a.Name);<br>}<br>System.debug(&#39;Found the following contacts.&#39;);<br>for (Contact c : searchContacts) {<br>    System.debug(c.LastName + &#39;, &#39; + c.FirstName);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f84fb911c35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Queueable Apex — Complete Beginner’s Guide]]></title>
            <link>https://medium.com/@akash.techmail/queueable-apex-complete-beginners-guide-2b06b3346068?source=rss-6fbbfdf445aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b06b3346068</guid>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[salesforce-apex]]></category>
            <category><![CDATA[salesforce-asynchronous]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Ak]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 07:21:04 GMT</pubDate>
            <atom:updated>2026-07-09T07:21:04.439Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p><strong>Queueable Apex</strong> is a Salesforce feature that allows you to execute Apex code <strong>asynchronously (in the background)</strong>.</p><p>Instead of making the user wait until a long-running task finishes, Salesforce places the task in a queue and executes it later using its background processing system.</p><p>Queueable Apex is the recommended asynchronous mechanism for most new Salesforce development because it is flexible, scalable, and easy to monitor.</p><h3>What is Asynchronous Execution?</h3><p>There are two ways code can execute.</p><h3>1. Synchronous Execution</h3><p>The code runs immediately, and the user waits until it completes.</p><p>Example:</p><pre>User Clicks Save<br>        │<br>        ▼<br>Business Logic Executes<br>        │<br>        ▼<br>Database Updates<br>        │<br>        ▼<br>Response Returned to User</pre><p>If the business logic takes 20 seconds, the user must wait for 20 seconds.</p><h3>2. Asynchronous Execution</h3><p>The user does not wait for the lengthy processing.</p><p>Instead, Salesforce stores the work as a job and executes it later.</p><pre>User Clicks Save<br>        │<br>        ▼<br>Job Added to Queue<br>        │<br>        ▼<br>Response Immediately Returned<br>        │<br>        ▼<br>Salesforce Executes Job Later</pre><p>This improves application performance and user experience.</p><h3>What is a Job?</h3><p>A <strong>job</strong> is simply a unit of work that Salesforce will execute.</p><p>Think of it as a task assigned to Salesforce.</p><p>Examples:</p><ul><li>Send confirmation emails</li><li>Update thousands of records</li><li>Generate reports</li><li>Call external REST APIs</li><li>Process uploaded files</li></ul><p>Each of these tasks can become an asynchronous job.</p><h3>What is Queueable Apex?</h3><p>Queueable Apex is an asynchronous Apex framework that allows developers to create jobs which Salesforce executes in the background.</p><p>A Queueable class must implement the Queueable interface.</p><p>Example:</p><pre>public class QueueableDemo implements Queueable {</pre><pre>    public void execute(QueueableContext context) {</pre><pre>        System.debug(&#39;Hello Queueable&#39;);</pre><pre>    }</pre><pre>}</pre><h3>Understanding the Queueable Interface</h3><p>The Queueable interface tells Salesforce:</p><blockquote><em>“This class represents a background job.”</em></blockquote><p>Just like Java has interfaces such as Runnable, Salesforce provides the Queueable interface.</p><p>Java:</p><pre>class MyTask implements Runnable {</pre><pre>    public void run() {</pre><pre>    }</pre><pre>}</pre><p>Salesforce:</p><pre>class QueueableDemo implements Queueable {</pre><pre>    public void execute(QueueableContext context) {</pre><pre>    }</pre><pre>}</pre><p>The concept is nearly identical.</p><h3>Understanding the execute() Method</h3><p>The execute() method contains the code that should run in the background.</p><pre>public void execute(QueueableContext context)</pre><p>Salesforce automatically invokes this method.</p><p>Developers never call it directly.</p><p>Everything inside this method executes asynchronously.</p><p>Example:</p><pre>public void execute(QueueableContext context){</pre><pre>    List&lt;Account&gt; accounts = [SELECT Id, Name FROM Account];</pre><pre>    for(Account acc : accounts){</pre><pre>        System.debug(acc.Name);</pre><pre>    }</pre><pre>}</pre><h3>What is QueueableContext?</h3><p>QueueableContext is an object created by Salesforce.</p><p>It contains information about the currently running job.</p><p>Most commonly it is used to retrieve the Job ID.</p><p>Example:</p><pre>public void execute(QueueableContext context){</pre><pre>    Id jobId = context.getJobId();</pre><pre>    System.debug(jobId);</pre><pre>}</pre><p>Developers never create QueueableContext manually.</p><p>Salesforce automatically passes it into the execute() method.</p><h3>What is System.enqueueJob()?</h3><p>This is the most important method in Queueable Apex.</p><p>Example:</p><pre>System.enqueueJob(new QueueableDemo());</pre><p>This method does <strong>not</strong> execute the class immediately.</p><p>Instead it:</p><ol><li>Creates the Queueable object.</li></ol><p>2. Registers it as an asynchronous job.</p><p>3. Places it into Salesforce’s execution queue.</p><p>4. Returns control to the current transaction.</p><p>5. Executes the job later.</p><p>Think of it as scheduling work rather than executing work.</p><h3>Internal Flow</h3><pre>Developer<br>     │<br>     ▼<br>new QueueableDemo()<br>     │<br>     ▼<br>System.enqueueJob()<br>     │<br>     ▼<br>Salesforce Queue<br>     │<br>     ▼<br>Background Worker<br>     │<br>     ▼<br>execute(QueueableContext)<br>     │<br>     ▼<br>Job Completed</pre><h3>Why Not Execute Immediately?</h3><p>Suppose saving an Account also needs to:</p><ul><li>Send an email</li><li>Call an ERP system</li><li>Generate a PDF</li><li>Update 20,000 records</li></ul><p>Executing all of this before returning a response would make the application slow.</p><p>Instead:</p><pre>Save Account</pre><pre>↓</pre><pre>Return Success</pre><pre>↓</pre><pre>Execute Heavy Processing Later</pre><p>The user experiences a much faster application.</p><h3>Real-Time Example</h3><p>Suppose a customer places an order.</p><p>Immediately after saving the order, you must:</p><ul><li>Send confirmation email</li><li>Notify warehouse</li><li>Generate invoice</li><li>Notify shipping service</li></ul><p>The customer does not need to wait for these operations.</p><p>Instead:</p><pre>insert order;</pre><pre>System.enqueueJob(new OrderProcessingJob(order.Id));</pre><p>Salesforce returns success immediately.</p><p>The OrderProcessingJob executes later in the background.</p><h3>Java Comparison</h3><p>JavaQueueable ApexRunnableQueueablerun()execute()ExecutorService.submit()System.enqueueJob()Worker ThreadSalesforce Background WorkerFuture TaskAsync Job</p><p>If you understand Java’s ExecutorService, Queueable Apex follows a very similar idea. The main difference is that Salesforce manages the execution environment for you.</p><h3>Advantages of Queueable Apex</h3><ul><li>Runs in the background.</li><li>Improves user experience.</li><li>Supports complex objects as member variables.</li><li>Can perform HTTP callouts (with the appropriate interface).</li><li>Jobs can be chained.</li><li>Job status can be monitored in Setup.</li><li>Receives its own asynchronous governor limits.</li></ul><h3>When Should You Use Queueable Apex?</h3><p>Use Queueable Apex when:</p><ul><li>Processing large amounts of data.</li><li>Sending emails after a transaction.</li><li>Calling external REST APIs.</li><li>Running long business logic.</li><li>Generating reports.</li><li>Executing tasks that are not required before responding to the user.</li></ul><p>Avoid Queueable Apex when the user must receive an immediate result before continuing.</p><h3>Monitoring Queueable Jobs</h3><p>Salesforce provides an Apex Jobs page.</p><p>Navigate to:</p><p><strong>Setup → Apex Jobs</strong></p><p>Here you can see:</p><ul><li>Job ID</li><li>Job Type</li><li>Submitted By</li><li>Status</li><li>Completion Time</li><li>Errors (if any)</li></ul><p>Typical job statuses include:</p><ul><li>Queued</li><li>Processing</li><li>Completed</li><li>Failed</li></ul><h3>Complete Example</h3><pre>public class QueueableDemo implements Queueable {</pre><pre>    public void execute(QueueableContext context) {</pre><pre>        System.debug(&#39;Queueable Job Started&#39;);</pre><pre>        List&lt;Account&gt; accounts =<br>            [SELECT Id, Name FROM Account LIMIT 5];</pre><pre>        for(Account acc : accounts){</pre><pre>            System.debug(acc.Name);</pre><pre>        }</pre><pre>        System.debug(&#39;Queueable Job Finished&#39;);</pre><pre>    }</pre><pre>}</pre><p>Execute it:</p><pre>System.enqueueJob(new QueueableDemo());</pre><p>Execution flow:</p><pre>Execute Anonymous</pre><pre>↓</pre><pre>System.enqueueJob()</pre><pre>↓</pre><pre>Job Stored in Salesforce Queue</pre><pre>↓</pre><pre>Salesforce Background Worker Picks the Job</pre><pre>↓</pre><pre>execute()</pre><pre>↓</pre><pre>Job Completed</pre><h3>Key Takeaways</h3><ul><li>Queueable Apex executes code asynchronously.</li><li>A Queueable class must implement the Queueable interface.</li><li>The execute() method contains the background logic.</li><li>QueueableContext is provided by Salesforce during execution.</li><li>System.enqueueJob() schedules the job; it does not execute it immediately.</li><li>Salesforce manages the queue and background workers.</li><li>Queueable Apex is the preferred asynchronous solution for most modern Salesforce development.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b06b3346068" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>