<?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 Manishajanwani on Medium]]></title>
        <description><![CDATA[Stories by Manishajanwani on Medium]]></description>
        <link>https://medium.com/@manishajanwani1996?source=rss-22c52829660c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kuDH4egtu9zENGmWMQJhdg@2x.jpeg</url>
            <title>Stories by Manishajanwani on Medium</title>
            <link>https://medium.com/@manishajanwani1996?source=rss-22c52829660c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:49:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manishajanwani1996/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[My First Dreamforce:]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">A Whirlwind of Innovation, Energy, and Inspiration</p><p class="medium-feed-link"><a href="https://medium.com/@manishajanwani1996/my-first-dreamforce-01a26c4f6b7d?source=rss-22c52829660c------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manishajanwani1996/my-first-dreamforce-01a26c4f6b7d?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/01a26c4f6b7d</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[dreamforce]]></category>
            <category><![CDATA[dreams]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 08:05:22 GMT</pubDate>
            <atom:updated>2025-11-08T08:05:22.982Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Issues I faced with overriding NEW button SFDC.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">When it comes to enhancing functionality and user experience in Salesforce, creating custom buttons is a game-changer. I recently tackled&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@manishajanwani1996/issues-i-faced-with-overriding-new-button-ee98b3a8ba9c?source=rss-22c52829660c------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manishajanwani1996/issues-i-faced-with-overriding-new-button-ee98b3a8ba9c?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee98b3a8ba9c</guid>
            <category><![CDATA[sfdc]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[button-design]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Thu, 20 Mar 2025 13:42:07 GMT</pubDate>
            <atom:updated>2025-03-20T13:44:04.111Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Transfer Scheduled batch ownership via script — Salesforce]]></title>
            <link>https://medium.com/@manishajanwani1996/transfer-scheduled-batch-ownership-via-script-salesforce-fc329ff8d2ae?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc329ff8d2ae</guid>
            <category><![CDATA[script]]></category>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[delete-user]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[users]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Tue, 04 Feb 2025 13:10:06 GMT</pubDate>
            <atom:updated>2025-02-04T13:10:06.294Z</atom:updated>
            <content:encoded><![CDATA[<h3>Transfer Scheduled batch ownership via script — Salesforce</h3><p><strong>Deactivating a User with Active Running Jobs? </strong><br>Avoid Disaster with This Script!</p><p>This script for transferring scheduled batch ownership in Salesforce is particularly valuable when a user is deactivated. It ensures continuity and prevents disruption by rescheduling all of the user’s jobs under a different username before deactivation. Additionally, this script can be employed as a trigger upon a user’s deactivation, automatically reassigning active jobs and throwing an error if any active jobs are present. <br>This proactive approach maintains seamless operation and adheres to best practices, ensuring that all scheduled jobs remain operational and correctly assigned within the system. <br>Avoid the chaos of deactivating users with active jobs and keep your Salesforce environment running smoothly!</p><pre>    <br>User oldUser = [SELECT Id FROM User WHERE Email=&#39;deactivateduseremail&#39; LIMIT 1];<br>// Fetch the new user<br>User newUser = [SELECT Id FROM User WHERE Email = &#39;newuseremail&#39; LIMIT 1];<br><br>List&lt;CronTrigger&gt; oldScheduledJobs = [<br>    SELECT Id, CronExpression, TimesTriggered, CronJobDetail.Name, CronJobDetailId, CreatedById <br>    FROM CronTrigger <br>    WHERE CreatedById = :oldUser.Id<br>];<br><br>System.debug(&#39;Found &#39; + oldScheduledJobs.size() + &#39; job(s) scheduled by &#39; + oldUser.Id);<br><br>// Loop through each scheduled job and recreate under the new user<br>for (CronTrigger oldJob : oldScheduledJobs) {<br>    // Find the Apex class associated with the scheduled job<br>    String cronJobDetailName = oldJob.CronJobDetail.Name;<br>    ApexClass apexClass = [SELECT Name FROM ApexClass WHERE Name = :cronJobDetailName LIMIT 1];<br>    <br>    if (apexClass != null) {<br>        // Create an instance of the Apex class<br>        Schedulable schedulableInstance = (Schedulable) Type.forName(apexClass.Name).newInstance();<br>        <br>        // Schedule the job under new user context using the CronExpression<br>        String newJobId = System.schedule(cronJobDetailName + &#39;New&#39;<br>                                          , oldJob.CronExpression, schedulableInstance);<br>        System.debug(&#39;Recreated job under new user: &#39; + schedulableInstance);<br>    } else {<br>        System.debug(&#39;Apex class not found for CronJobDetail: &#39; + cronJobDetailName);<br>    }<br>}<br>//delete oldScheduledJobs;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc329ff8d2ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Ways to Handle Form Inputs in JavaScript: Which One’s Better?]]></title>
            <link>https://medium.com/@manishajanwani1996/js-learningss-1441b9f9430a?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1441b9f9430a</guid>
            <category><![CDATA[lightning]]></category>
            <category><![CDATA[lwc]]></category>
            <category><![CDATA[sfdc]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 13:47:13 GMT</pubDate>
            <atom:updated>2024-11-05T13:47:31.094Z</atom:updated>
            <content:encoded><![CDATA[<p>Handling Form Changes in JavaScript: Two Approaches</p><h4>1. Using Explicit if Checks</h4><ul><li><strong>What it does:</strong> You manually check the name of the input field (e.g., height or weight) and update the corresponding property on the object.</li><li><strong>Example:</strong></li><li>if (this.name == &#39;height&#39;) this.height = value; if (this.name == &#39;weight&#39;) this.weight = value;</li><li><strong>Limitations:</strong> As the number of input fields grows, you need more if conditions for each one, making the code harder to maintain.</li></ul><h4>2. Using Dynamic Property Assignment (this[name] = value)</h4><ul><li><strong>What it does:</strong> Instead of checking each name manually, this approach uses the name from the input to dynamically update the correct property of the object.</li><li><strong>Example:</strong></li><li>this[name] = value; <em>// Dynamically updates the property based on the input&#39;s &#39;name&#39; attribute</em></li><li><strong>How HTML helps:</strong> The name attribute in HTML (e.g., name=&quot;height&quot;) directly corresponds to the property on the object (this.height). This makes the code clean and scalable.</li></ul><h3>How HTML Plays a Role</h3><ul><li>The name attribute in the HTML input field determines <strong>which property</strong> of the object should be updated.</li><li>Example:</li><li>If the input has name=&quot;height&quot;, it updates this.height.</li><li>If the input has name=&quot;weight&quot;, it updates this.weight.</li></ul><h3>Quick Takeaways</h3><ul><li><strong>Explicit </strong><strong>if Checks:</strong> Simple but not scalable—every new field needs a new condition.</li><li><strong>Dynamic </strong><strong>this[name] = value:</strong> Scalable and flexible—just map the HTML name to an object property and you&#39;re good to go!</li></ul><p>This makes the second approach much more efficient when handling forms with many fields.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1441b9f9430a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Checklist — How to deactivate a user in Salesforce]]></title>
            <link>https://medium.com/@manishajanwani1996/checklist-how-to-deactivate-a-user-in-salesforce-fa1b6bfef6ed?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa1b6bfef6ed</guid>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Tue, 04 Jun 2024 15:19:40 GMT</pubDate>
            <atom:updated>2024-06-06T07:00:15.629Z</atom:updated>
            <content:encoded><![CDATA[<h3>Checklist — How to deactivate a user in Salesforce</h3><p>Deactivation of a user in Salesforce requires careful review and preparation. <br>The following list includes several steps to consider:</p><p>1.Review the user’s audit trail to inspect all their activities.<br>2. Examine any outbound messages sent from the user.<br>3. Identify any approval processes associated with the user.<br>4. Analyze the user’s login history to identify the different applications they’ve accessed.<br>5. Inspect email alerts related to the user.<br>6. Check for the user’s name or email mentioned in flow/apex or selected in field picklist values/labels.<br>7. Determine who all report to this user, if they’re identified as a manager.<br>8. Verify if the user is part of any queues.<br>9. Request email logs from Salesforce to analyse the nature of emails sent by the user and identify the recipients.<br>10.THE MOST interesting and important one — you would like to know if there were any report subscribed and sent via that user’s name?<br>Here you go :<a href="https://help.salesforce.com/s/articleView?id=sf.reports_subscription_reporting_all_in_one.htm&amp;type=5"> follow this </a>, and create a report and you can see sender name, recipient name and other details.</p><p>I will keep adding more, thanks for stopping by.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa1b6bfef6ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Avoid SF OOTB — Account owner change, update open opportunities.]]></title>
            <link>https://medium.com/@manishajanwani1996/avoid-sf-ootb-account-owner-change-update-open-opportunities-0e6fd17e3714?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e6fd17e3714</guid>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Tue, 20 Feb 2024 12:46:23 GMT</pubDate>
            <atom:updated>2024-02-20T12:55:43.035Z</atom:updated>
            <content:encoded><![CDATA[<h3>Avoid SF OOTB — Account owner change, updates open opportunities.</h3><p><strong>Problem Statement:<br></strong>If a user modifies the account owner <strong>from the User Interface(only)</strong>, all open opportunities owned by the previous account owner will be automatically updated to the new account owner.</p><p><strong>Salesforce Related Articles:</strong><br><a href="https://help.salesforce.com/s/articleView?id=sf.account_owner_transfer.htm&amp;type=5"><em>https://help.salesforce.com/s/articleView?id=sf.account_owner_transfer.htm&amp;type=5</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nq69veriApRicQLdcm6elg.png" /></figure><p><strong>WorkArounds?</strong></p><p><strong>NO CODE OPTION</strong><br>Here’s a simplified version of the action plan:</p><ol><li>Remove the pre-existing owner field from page setups.</li><li>Establish a new field with a formula that gives the owner’s name, then add it to the layouts instead of the default field.</li><li>Remove the “change owner” button from the layouts.</li><li>Bring in a new “change owner” button in the layout that operates an effortless screen flow to modify ownership.<br>(TESTED AND CHECKED THAT INTRODUCTION OF A FLOW BUTTON, DOES NOT INVOKE THE OOTB FUNCTIONALITY)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*RPLr-uwajQu4zJifzGNNiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nJ7v9jAhTv1iyOYKWVVV5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jklwNt20uKfZ4AzXYG5XdQ.png" /></figure><p><strong>Considerations:</strong></p><blockquote>Whether users should be allowed to modify account owners from the UI?</blockquote><blockquote>Who will do it, why, and how often?</blockquote><blockquote>Will the change of ownership via the new button rather than the owner field obstruct any necessary user behaviours?</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e6fd17e3714" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackerRank “Balanced Parentheses” Problem — using Apex Salesforce.]]></title>
            <link>https://medium.com/@manishajanwani1996/hackerrank-balanced-parentheses-problem-using-apex-salesforce-60f6dcf4d77e?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/60f6dcf4d77e</guid>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Sun, 13 Aug 2023 08:51:26 GMT</pubDate>
            <atom:updated>2024-02-01T04:28:09.536Z</atom:updated>
            <content:encoded><![CDATA[<h3>HackerRank “Balanced Parentheses” Problem — using Apex Salesforce.</h3><h3>Problem:</h3><p>Check that the given string has balanced parentheses or not.<br>Example → <br>( [ ] ) results true<br>( [ { ] results false</p><h3>Solution:</h3><p>Stack is not a primitive datatype in Apex, here I have tried solving the problem mimicing stack as a Set in Salesforce.</p><p>Solving this problem using Apex, in this problem the brute-force approach takes O(n²) complexity, doing it via stack reduces the complexity to O(n).</p><pre>public static Boolean isValid(String s){<br>        //code here <br>        List&lt;String&gt; stack = new List&lt;String&gt;();<br>        Set&lt;String&gt; validInput = new Set&lt;String&gt;{&#39;(&#39;,&#39;{&#39;,&#39;[&#39;,&#39;)&#39;,&#39;}&#39;,&#39;]&#39;};<br>            Map&lt;String,String&gt; validParanthesisMap = new Map&lt;String,String&gt;{<br>                &#39;}&#39;=&gt;&#39;{&#39;,<br>                    &#39;)&#39;=&gt;&#39;(&#39;,<br>                    &#39;]&#39;=&gt;&#39;[&#39;<br>                    };<br>                        <br>                        for(String str : s.split(&#39;&#39;)){<br>                            if(!validInput.contains(str))<br>                                return false;<br>                            if(stack.isEmpty() == true)<br>                                stack.add(str);<br>                            else{<br>                                if(validParanthesisMap.containsKey(str)){<br>                                    String peep = validParanthesisMap.get(str);<br>                                    if(peep == stack.get(stack.size()-1))<br>                                        stack.remove(stack.size()-1);<br>                                }<br>                                else<br>                                    stack.add(str);<br>                            }<br>                            <br>                        }<br>        <br>        if(stack.isEmpty())<br>            return true;<br>        else<br>            return false;<br>        <br>    }</pre><p><strong>Do share your thoughts/any better approach.</strong></p><p><strong>Cheers!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60f6dcf4d77e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce Apex: Data Structure and Algorithm →Longest Common Prefix]]></title>
            <link>https://medium.com/@manishajanwani1996/salesforce-apex-data-structure-and-algorithm-longest-common-prefix-221f41d728c4?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/221f41d728c4</guid>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Fri, 28 Jul 2023 05:44:09 GMT</pubDate>
            <atom:updated>2023-07-28T05:44:09.846Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi All,<br>We all love DSA.<br>I tried to get my hands dirty trying LCS, I have solved the below problem using Binary Search.<br>I have tried using 2 pointer approach to solve it in linear time.</p><p>Time Complexity — O(N)</p><pre>  public static void findLCS(List&lt;String&gt; inputStringList){<br>        //Step 1. Choose Smalled String in the list.<br>        Integer high = 10000; //store length of smallest string, it is the highest LCS<br>        String smallestString = &#39;&#39;;<br>        String matchingString = &#39;&#39;;<br>        for(String str : inputStringList){//O(n)<br>            if(str.length() &lt; high){<br>                high = str.length();<br>                smallestString = str;<br>            }   <br>        }<br>        Integer mid = (Integer)Math.floor((high)/2);<br>        //Perform Binary Search on the smallest string.<br>        /*<br>* n the while-loop, the code performs binary search on the smallest string in the input list. The time complexity of binary search is O(log m), where m is the length of the smallest string. Since the code performs binary search at most log m times, the time complexity of the while-loop is O(log m).*/<br>        //log(high)<br>        while(mid &lt;=high){<br>            String prefix = smallestString.substring(0, mid);<br>            if(subStringPresent(prefix , inputStringList) == true){<br>                mid = mid+1;<br>                matchingString = prefix;<br>                //check for bigger strings<br>            }else{<br>                system.debug(&#39;fail&#39;);<br>                break;<br>            }<br>        }<br>        <br>        System.debug(&#39;matchingString &#39;+matchingString);<br>    }</pre><p>Do share your thoughts/any better approach.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=221f41d728c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce Apex: Data Structure and Algorithm →linear complexity, Find MaximumSubArray]]></title>
            <link>https://medium.com/@manishajanwani1996/salesforce-apex-data-structure-and-algorithm-linear-complexity-find-maximumsubarray-5b386b9088d0?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b386b9088d0</guid>
            <category><![CDATA[sad]]></category>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Mon, 05 Jun 2023 13:44:51 GMT</pubDate>
            <atom:updated>2023-06-05T13:44:51.851Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi all,<br>Lately, I have been solving DSA using apex, and it is fun, due to the limited data types we have, and lesser OTB functions.</p><p>In current problem, <strong><em>we need to get a subarray with maximum profit and subarray size=target.</em></strong></p><p>BUTTTT:<br>Linear Time complexity.</p><p>I have used 2 pointer approach.</p><pre> public static Integer maxSubArraySum(List&lt;Integer&gt; nums, Integer target){<br>        //code here <br>        Integer max = 0;<br>        <br>        for(Integer i = 0;i&lt;target; i++){<br>            max+=nums[i];<br>        }<br>        Integer curSum = max;<br>        for(Integer i =0 ;i&lt;nums.size()-target;i++){<br>            Integer nextMax =  (curSum -  nums[i]) + nums[target+i];<br>            if(max &lt; nextMax){<br>                max = nextMax;<br>            }<br>            curSum = nextMax;<br>            <br>        }<br>        <br>        return max;<br>    }</pre><p>Do share your thoughts/any better approach.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b386b9088d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce Apex: Data Structure and Algorithm →linear complexity Palindrome]]></title>
            <link>https://medium.com/@manishajanwani1996/salesforce-apex-data-structure-and-alogrithm-linear-complexity-palindrome-b2569539e33a?source=rss-22c52829660c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2569539e33a</guid>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[sad]]></category>
            <dc:creator><![CDATA[Manishajanwani]]></dc:creator>
            <pubDate>Mon, 05 Jun 2023 13:40:54 GMT</pubDate>
            <atom:updated>2023-06-05T13:43:10.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi all,<br>Lately, I have been solving DSA using apex, and it is fun, due to the limited data types we have, and lesser OTB functions.</p><p>In current problem, we need to check a given string is <strong>palindrome</strong> or not.<br>BUTTTT:<br><strong>1. In-place solution only.<br>2. Linear Time complexity.</strong></p><p>I have used 2 pointer approach.</p><pre> public static Boolean isPalindrome2(String str){<br>        if(String.isBlank(str))<br>            return true;<br>        //code here<br>        str = str.toLowerCase();<br>      //removing any special characters from string, assume we will not have it, but still being on safer side.<br>        str = str.replaceAll(&#39;[^0-9a-zA-Z]&#39;,&#39;&#39;); <br>        Integer rightptr = str.length()-1;<br>        for(Integer i=0;i&lt;rightptr;i++){<br>            //a pointer in the beginning(i), a pointer in the end(rightptr)<br>            if(str.charAt(i) == str.charAt(rightptr)){<br>                rightptr--;<br>            }else{<br>                return false;<br>            }<br>        } <br>        return true;<br>    }</pre><p>Do share your thoughts/any better approach.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2569539e33a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>