<?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 Soobin Kittredge on Medium]]></title>
        <description><![CDATA[Stories by Soobin Kittredge on Medium]]></description>
        <link>https://medium.com/@soobink?source=rss-83a69797f6ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bJiNn4rvqd2DzQRryTAZBQ.jpeg</url>
            <title>Stories by Soobin Kittredge on Medium</title>
            <link>https://medium.com/@soobink?source=rss-83a69797f6ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:42:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@soobink/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[Your Salesforce org should REALLY be in a repo now… like yesterday.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://soobink.medium.com/your-salesforce-org-should-really-be-in-a-repo-now-like-yesterday-da2541b473a7?source=rss-83a69797f6ad------2"><img src="https://cdn-images-1.medium.com/max/2600/1*yZ0A-yL0hUGusevIzLufBA.jpeg" width="5327"></a></p><p class="medium-feed-snippet">Despite years of improvement in Salesforce DX and developer tooling, there are still plenty of comfortable ways to develop and deploy&#x2026;</p><p class="medium-feed-link"><a href="https://soobink.medium.com/your-salesforce-org-should-really-be-in-a-repo-now-like-yesterday-da2541b473a7?source=rss-83a69797f6ad------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://soobink.medium.com/your-salesforce-org-should-really-be-in-a-repo-now-like-yesterday-da2541b473a7?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/da2541b473a7</guid>
            <category><![CDATA[ai-development]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 02:28:22 GMT</pubDate>
            <atom:updated>2026-02-23T02:28:22.799Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Reactive Screen Flow LWC & Jest Test]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://soobink.medium.com/reactive-screen-flow-lwc-jest-test-1cf60577a1c1?source=rss-83a69797f6ad------2"><img src="https://cdn-images-1.medium.com/max/2600/1*FOv52N6VHFZx9bdK0smBDg.jpeg" width="6240"></a></p><p class="medium-feed-snippet">Utilizing user&#x2019;s interaction with on screen component on Screen Flow allows user-friendly UI, keeping the user in the same page without&#x2026;</p><p class="medium-feed-link"><a href="https://soobink.medium.com/reactive-screen-flow-lwc-jest-test-1cf60577a1c1?source=rss-83a69797f6ad------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://soobink.medium.com/reactive-screen-flow-lwc-jest-test-1cf60577a1c1?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cf60577a1c1</guid>
            <category><![CDATA[salesforce-flow]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[lwc]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Sun, 03 Aug 2025 23:46:26 GMT</pubDate>
            <atom:updated>2025-08-04T00:19:00.540Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How To Use Prompt Template In Automated Processes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://soobink.medium.com/how-to-use-prompt-template-in-automated-processes-78fc3599c9ed?source=rss-83a69797f6ad------2"><img src="https://cdn-images-1.medium.com/max/2600/1*SR5RcbbjDeuSW0FWpyaAEA.jpeg" width="7806"></a></p><p class="medium-feed-snippet">Especially with Agentforce sweeping across the Salesforce ecosystem, Prompt Builder is becoming a powerful addition to any Salesforce org&#x2026;</p><p class="medium-feed-link"><a href="https://soobink.medium.com/how-to-use-prompt-template-in-automated-processes-78fc3599c9ed?source=rss-83a69797f6ad------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://soobink.medium.com/how-to-use-prompt-template-in-automated-processes-78fc3599c9ed?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/78fc3599c9ed</guid>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[prompt-builder]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Wed, 21 May 2025 01:04:03 GMT</pubDate>
            <atom:updated>2025-05-21T01:42:34.639Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Changing LWC Subtab’s Label and Icon]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://soobink.medium.com/changing-lwc-subtabs-label-and-icon-1046ebdf2b13?source=rss-83a69797f6ad------2"><img src="https://cdn-images-1.medium.com/max/2600/1*UV6sDRPMe2WEiPvHDHnN1Q.jpeg" width="7200"></a></p><p class="medium-feed-snippet">In my previous post, I explained how to open an LWC in a new tab within another LWC.</p><p class="medium-feed-link"><a href="https://soobink.medium.com/changing-lwc-subtabs-label-and-icon-1046ebdf2b13?source=rss-83a69797f6ad------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://soobink.medium.com/changing-lwc-subtabs-label-and-icon-1046ebdf2b13?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/1046ebdf2b13</guid>
            <category><![CDATA[lightning-web-component]]></category>
            <category><![CDATA[lwc]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Thu, 08 May 2025 03:22:45 GMT</pubDate>
            <atom:updated>2025-05-08T03:22:45.258Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Open LWC Page from a LWC— Without an Aura Component]]></title>
            <link>https://soobink.medium.com/open-lwc-page-from-a-lwc-without-an-aura-component-b9e38dad6d21?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9e38dad6d21</guid>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce-lightning]]></category>
            <category><![CDATA[lwc]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Fri, 03 May 2024 00:06:18 GMT</pubDate>
            <atom:updated>2025-06-07T20:31:15.968Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2aw3SqJ_wWBFEvKt-BeLLA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@kat_katerina?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Katerina Pavlyuchkova</a> on <a href="https://unsplash.com/photos/opened-brown-wooden-window-FQYCJSqER_0?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p>During my recent LWC development, I was asked to open a LWC component in a new page, as the LWC contained an extensive datatable. It was useful for users to be able to see them in (sort of) full screen within their console view.</p><p>There are multiple useful tricks I have learned while I completed the above requirement:</p><ul><li>Opening up a LWC in a page/tab</li><li>Changing a subtab’s label/icon</li><li>Properly performing jest tests for LWC with mocked lightning modules</li><li>Implementing column sorting in an LWC datatable</li><li>Subscribing to a messaging channel</li></ul><p>It’s been a while since I have posted on Medium, so I thought those would be useful tricks I could share before I forget what I had done.</p><p>As for this article, I’ll briefly share how to open a LWC in a page/tab from another LWC component. My specific use case was to <em>open a custom related list component in a bigger view for the users</em>. I didn’t have to create another component, but just to have the link reload the same component in a new tab.</p><h3>Opening up LWC in a page/tab — Salesforce Documentation</h3><p><a href="https://developer.salesforce.com/docs/platform/lwc/guide/reference-page-reference-type.html#lightning-component-type">Based on Salesforce documentation</a>, you wrap the LWC within an Aura component that implements the lightning:isUrlAddressable interface.</p><pre>{<br>    type: &#39;standard__component&#39;,<br>    attributes: {<br>        componentName: &#39;c__DisplayComp&#39;<br>    },<br>    state: {<br>        c__passedValue: &#39;xxx&#39;<br>    }<br>}</pre><p>But given Salesforce is actively working to deprecate Aura components gradually in favor of LWCs, this won’t be a preferred method.</p><h3>Opening up LWC without an Aura Wrap</h3><p>Why would you add another wrapper (Aura component, no less) when you could directly open up the component?</p><p>There are a handful of articles regarding navigating to a LWC without using an Aura component. <a href="https://salesforcediaries.com/2020/06/08/directly-navigate-to-lightning-web-component-without-using-aura-component/">This article</a> nicely explains how you can import the NavigationMixin module from lightning/navigation component, passing data through the URL by encoding it.</p><ul><li>navComp : component with data which has navigation functionality</li></ul><pre>&lt;template&gt;<br>  &lt;lightning-input data-id=&quot;inputValue&quot; type=&quot;text&quot;&gt;&lt;/lightning-input&gt;<br>  &lt;lightning-button<br>    label=&quot;Open LWC&quot;<br>    onclick={handleNavigate}<br>  &gt;&lt;/lightning-button&gt;<br>&lt;/template&gt;</pre><pre>import { LightningElement } from &#39;lwc&#39;;<br>import { NavigationMixin } from &#39;lightning/navigation&#39;;<br>export default class NavComp extends NavigationMixin(LightningElement) {<br><br>  handleNavigate() {<br>    var compDefinition = {<br>      componentDef: &#39;c:displayComp&#39;,<br>      attributes: {<br>        passedValue: this.template.querySelector(&#39;lightning-input[data-id=inputValue]&#39;).value,<br>      },<br>    };<br>    // Base64 encode the compDefinition JS object<br>    var encodedCompDef = btoa(JSON.stringify(compDefinition));<br>    this[NavigationMixin.Navigate]({<br>      type: &#39;standard__webPage&#39;,<br>      attributes: {<br>        url: &#39;/one/one.app#&#39; + encodedCompDef,<br>      },<br>    });<br>  }<br>}</pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;LightningComponentBundle xmlns=&quot;http://soap.sforce.com/2006/04/metadata&quot;&gt;<br>    &lt;apiVersion&gt;60.0&lt;/apiVersion&gt;<br>    &lt;isExposed&gt;true&lt;/isExposed&gt;<br>    &lt;targets&gt;<br>        &lt;target&gt;lightning__RecordPage&lt;/target&gt;<br>    &lt;/targets&gt;<br>    &lt;targetConfigs&gt;<br>        &lt;targetConfig targets=&quot;lightning__RecordPage&quot;&gt;<br>          &lt;objects&gt;<br>            &lt;object&gt;Contact&lt;/object&gt;<br>          &lt;/objects&gt;<br>        &lt;/targetConfig&gt;<br>    &lt;/targetConfigs&gt;<br>&lt;/LightningComponentBundle&gt;</pre><ul><li>displayComp : component with passed data which opens in a new page/tab</li></ul><pre>&lt;template&gt; <br>    &lt;lightning-input value={passedValue}&gt;&lt;/lightning-input&gt;<br>&lt;/template&gt;</pre><pre>import { LightningElement, api } from &#39;lwc&#39;;<br><br>export default class DisplayComp extends LightningElement {<br>  @api passedValue;<br>}</pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;LightningComponentBundle xmlns=&quot;http://soap.sforce.com/2006/04/metadata&quot;&gt;<br>    &lt;apiVersion&gt;60.0&lt;/apiVersion&gt;<br>    &lt;isExposed&gt;false&lt;/isExposed&gt;<br>&lt;/LightningComponentBundle&gt;</pre><h3>Result (In a console app)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*_4n-GQLxkPgy9Jzc5QFoKw.gif" /></figure><p>You can see that the new component is opened in a subtab if the component is being opened within a console app. However, you can see that the subtab’s icon and label are stuck on ‘Loading’ as there is no function to update them. You can checkout <a href="https://medium.com/@soobink/changing-lwc-subtabs-label-and-icon-1046ebdf2b13">my next article</a> on how to update the subtab’s icon and its label using the platformWorkspaceApi lightning modules.</p><p>Also, testing the lightning modules sometimes requires a couple of test configurations from creating mocked JavaScript to updating jest.config.js. I’ll cover testing in an upcoming article as well.</p><p>Also, some validator might mark btoa fuction as deprecated and suggest utilizing Buffer class. I have tried many different ways to use the Buffer class, but couldn’t make any of them work. I might have missed some detail, but if you know how to use the Buffer class to replace thebtoa function, please let me know!</p><p>Thank you and happy Salesforce ☁</p><h3>Resources</h3><ul><li>[Blog] <a href="https://salesforcediaries.com/2020/06/08/directly-navigate-to-lightning-web-component-without-using-aura-component/">Directly Navigate to Lightning Web Component Without Using Aura Component</a></li><li>[Repo] <a href="https://github.com/trailheadapps/lwc-recipes">TrailheadApps/lwc-recipe</a></li><li>[Documentation] <a href="https://developer.salesforce.com/docs/platform/lwc/guide/reference-page-reference-type.html#lightning-component-type">Page Reference Types</a></li><li>[Article] <a href="https://medium.com/@soobink/changing-lwc-subtabs-label-and-icon-1046ebdf2b13">Changing LWC Subtab’s Label and Icon</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9e38dad6d21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOQL Permission & Sharing Checking in Apex — Required for Every SOQL?]]></title>
            <link>https://soobink.medium.com/soql-permission-sharing-checking-in-apex-required-for-every-soql-2ff4cf86e2f1?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ff4cf86e2f1</guid>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce-security]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Tue, 15 Nov 2022 00:14:43 GMT</pubDate>
            <atom:updated>2022-11-15T00:14:43.611Z</atom:updated>
            <content:encoded><![CDATA[<h3>SOQL Permission &amp; Sharing Checking in Apex — Required for Every SOQL?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_ZTBeBXF2_xls0W73ILmQ.png" /><figcaption>Photo by <a href="https://unsplash.com/@siora18?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Siora Photography</a> on <a href="https://unsplash.com/s/photos/no-access?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3><em>Should every single SOQL used in Apex be checking sharing and permission?</em></h3><p>Some might say absolutely, and that’s where the Salesforce is heading towards as well, making it easier doing so in Apex with every release. Salesforce team’s bigger goal, if I remember correctly, is to have the query check for permission and sharing by default (away from system mode by default). I’m sure there a lots of great articles out there on how you could check permissions and sharing, so I’ll keep this article strictly related to the topic of the implications of doing so in every SOQL in Apex.</p><p>It’s easy to ask Salesforce developer to do so — <em>Hey, quick request. Check permission and sharing for every SOQL in Apex. DONE </em>— , but <strong>the implication of such implementation requires more considerations and business decisions.</strong></p><p>The core reason for checking Object/Field permissions and record sharing when a user triggers certain Apex is that you don’t want unwanted data to be accessed. So a developer goes into the Apex side, and updates all SOQL to check for permission and sharing, providing any missing object/field permission to the profile/permission sets as needed to prevent QueryException: Insufficient permissions from halting a user transaction.</p><p>But consider hidden objects/fields or records only used for business logic. If, for example, your business has a hidden score for each leads and opportunity that’s used for new lead assignments, does providing permissions to such fields only for SOQL to run make sense in a security perspective? How about utilizing Custom Metadata Types to store static values used in routing Apex transaction? Should users have permission to view such objects for SOQL to run?</p><p><strong>Apex running in System mode provides certain level of security</strong>, as it runs as ‘System’ and thus requesting making ‘every SOQL to check permission and sharing’ ignores such aspect.</p><p>To implement secure SOQL in Apex, try asking some questions within your team and with related parties:</p><ol><li>Identify why SOQL is used — Is the data needed for business logic processing or to display?</li><li>List which objects/fields will be strictly for backend — Custom Metadata Types, if used in an Apex, would highly likely to be an object only used for business logic/transaction routing/etc in the backend.</li><li>Check to see if the query results get printed for end users — intended or not.</li><li>Error handling for query exception — halt transaction and surface error or skip the logic entirely?</li></ol><p>A new accessLevel parameter for SOQL with WITH USER_MODE and WITH SYSTEM_MODE is in beta (check out <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_enforce_usermode.htm">HERE</a>!), so it would be the best practice to specify which SOQL should be run in user mode while others are running in system mode, and prevent any unwanted ‘default’ behavior resulted from Salesforce release in the unknown future.</p><p>Summary of the article is that: checking permission/sharing on SOQL should be decided case by case (or pattern by pattern) bases. Blanket statement like ‘check every SOQL’ could introduce more security risk than you might expect as well as a lot of QueryExceptions and annoyed users (even when the changes were made with greatest care, it’s not rare to see unexpected behaviors in Salesforce world with such changes!).</p><p>I welcome any opinions and comments on the idea! Do you think this makes sense? Or should all SOQL be checked for permission/sharing &amp; provide required permissions to users?</p><p>Thank you for reading this article. Hope everyone is having a great start of the cold season, and stay warm! ❄️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ff4cf86e2f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing LWC : Online compiler & Mock Data API]]></title>
            <link>https://soobink.medium.com/developing-lwc-online-compiler-mock-data-api-f7f801cbc7f8?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7f801cbc7f8</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Sat, 25 Jun 2022 04:57:52 GMT</pubDate>
            <atom:updated>2022-06-25T05:04:51.967Z</atom:updated>
            <content:encoded><![CDATA[<h3>Developing LWC : Online compiler &amp; Mock Data API</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q6uaacpjI4mt9SshDIbNjA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@thefredyjacob?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Fredy Jacob</a> on <a href="https://unsplash.com/s/photos/data?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>A few weeks back, I was studying through the Summer ’22 Release of Salesforce. While checking out a section related to the datatable virtual rendering in LWC (which is very neat), I found out that mock data endpoint was utilized to <a href="https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/example">visualize the data table component library example</a>. It made perfect sense that they would use an API endpoint to grab mock data for an example, and thought I could share what I found.</p><h3>Mock Data API Endpoint</h3><p>This is the magic helper javascript used in the data table component example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48005b2be2a0012f461c017f3bbaa3f4/href">https://medium.com/media/48005b2be2a0012f461c017f3bbaa3f4/href</a></iframe><p>If you’d like to test this out using an API platform like Postman, try following:</p><ul><li>Endpoint</li></ul><pre>POST <a href="https://data-faker.herokuapp.com/collection">https://data-faker.herokuapp.com/collection</a></pre><ul><li>Header</li></ul><pre>&#39;Content-Type&#39;:&#39;application/json; charset=utf-8&#39;</pre><ul><li>Body</li></ul><pre>{<br>  &quot;amountOfRecords&quot;: 100,<br>  &quot;recordMetadata&quot;: {<br>    &quot;returnFieldName1&quot;: &quot;fieldValueType1&quot;,<br>    &quot;returnFieldName2&quot;: &quot;fieldValueType2&quot;, <br>    ...<br>    &quot;returnFieldNameX&quot;: &quot;fieldValueTypeX&quot;<br>   }<br>}</pre><p>You can freely set the amountOfRecords as many records as you need. I was able to tested 100k and it returned 100k objects, thankfully without breaking my machine or freezing Postman.</p><p>Requested data fields with value type will be returned from the endpoint. Followings are the returnable value types I have found so far:</p><ul><li><strong>name </strong>: Name string: first name and last name<br>- Dario Feeney<br>- Sylvia Kuhic</li><li><strong>email </strong>: Email string<br>- Darius73@hotmail.com<br>- Vesta_Kassulke@gmail.com</li><li><strong>url </strong>: Business website string<br>- https://nella.com<br>- http://damion.biz</li><li><strong>currency </strong>: Double value with 2 decimal places<br>- 123.45<br>- 800.21</li><li><strong>uuid </strong>: UUID string<br>- efacaac5–880f-43b7–84f6–1280c14eff70<br>- a2da3c07-d830–49ee-89ee-6500fec104c1</li><li><strong>phoneNumber </strong>: Phone number string in various format (Contry number, extension, dash/dot divider….)<br>- 1–018–968–5528<br>- 583.598.3976 x3223<br>- (770) 834–8558<br>- (058) 813–2837 x1004</li><li><strong>dateInFuture </strong>: Datetime string in future date<br>- 2023–06–21T00:13:54.354Z<br>- 2023–02–20T16:55:46.408Z</li><li><strong>dateInPast </strong>: Datetime string in past date<br>- 2021–11–11T20:03:25.153Z<br>- 2022–01–29T18:42:07.273Z</li></ul><p>You can name return field name however you like except for one return value type — ID or UUID. No matter how you name the return field, it will return value with a field name of &quot;id&quot;</p><h3>Online LWC Compiler</h3><p>Data itself won’t be much useful without any frontend. You can always play around the component library example, there is cooler option where you can save your work and share with your team.</p><ul><li><a href="https://webcomponents.dev/new"><strong>https://webcomponents.dev/new</strong></a></li></ul><p>You’ll see the LWC as one of the option available for Compiler section.</p><p>You can spin up a new LWC compiler online less than a second (depends on your internet connection) without going through normal process of developing a LWC component — Setup SFDX project and create scratch org with your DevHub authorization or <a href="https://developer.salesforce.com/tools/vscode/en/localdev/set-up-lwc-local-dev">spin up local compiler</a>.</p><p>Following is the datatable example built on the online compiler — simple combination of the original datatable example and the <a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_lc_datatable.htm&amp;type=5&amp;release=238">datatable virtual rendering code snippet from the release note</a>.</p><p><a href="https://studio.webcomponents.dev/edit/8yfaci1VwlClwfqtJLAn/?sv=1&amp;pm=1">lwc-virtual-datatable by soob-cmd</a></p><p>Hope this is useful for building your next LWC proof of concept quickly, combined with realistic mock data.</p><h3>Resources</h3><ul><li>LWC Online Compiler: <br><a href="https://webcomponents.dev/new">https://webcomponents.dev/new</a></li><li>LWC Data table Component Reference: <br><a href="https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/example">https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/example</a></li><li>Summer’22 Release note — Datatable virtual rendering: <br><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_lc_datatable.htm&amp;type=5&amp;release=238">https://help.salesforce.com/s/articleView?id=release-notes.rn_lc_datatable.htm&amp;type=5&amp;release=238</a></li><li>Set Up LWC Local Development:<br><a href="https://developer.salesforce.com/tools/vscode/en/localdev/set-up-lwc-local-dev">https://developer.salesforce.com/tools/vscode/en/localdev/set-up-lwc-local-dev</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7f801cbc7f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finally Learning How To Use Apex Replay Debugger]]></title>
            <link>https://soobink.medium.com/finally-learning-how-to-use-apex-replay-debugger-7cff5c0215fd?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cff5c0215fd</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-tools]]></category>
            <category><![CDATA[sales-development]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Fri, 10 Jun 2022 01:50:51 GMT</pubDate>
            <atom:updated>2022-06-12T22:11:52.114Z</atom:updated>
            <content:encoded><![CDATA[<p>TLDR; Improved Apex Replay Debugger makes it easier for devs to debug codes — easier than adding System.debug(&#39;#### CODE IS HERE&#39;); on multiple lines in classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*DsPiVzyGyJhidW48ecn8tw.png" /><figcaption><a href="https://www.reddit.com/r/ProgrammerHumor/comments/ba8thr/the_real_debugging_tool/">Source</a></figcaption></figure><p>I’ll admit that I knew a free Apex debugging tool was an available option that helps debugging easier once you get into the habit of utilizing it. But when I’m on the clock trying to figure out why the result of test is null when it supposed to be 1, it’s so much faster/easier for me to just add in couple of System debug logs and search through the apex logs.</p><p>Previously known workflow of utilizing replay debug consisted of multiple steps from creating a trace flags in the org to retrieving the logs down for replay. Thus — Just adding some debug logs into the classes and test classes was simpler and faster way to quickly identify the issue. This is a simple and straight forward way to check what is going on with the test, except for the fact that you start making debug logs directly in your development environment to save time deploying ‘just couple of debug lines in different locations’ 10 times. Sometimes you find the bug, fix it (if you are lucky), and realize you just made all of the changes in sandbox/scratch org. No big deal, just need to copy over the fixed code from Developer Console to VScode, and get rid of the debug log lines.</p><p>Now, with the improved process, all you need to do is to create couple of breakpoint/checkpoint on lines you’d like to investigate, click on Debug Test link above the test method. The rest of the job — loading the checkpoints to the org, running tests, getting transaction logs, loading the logs into the IDE — is taken care of by the Apex Replay Debugger.</p><p>Here are some screenshots of using the replay debugger, so you don’t have to waste time reading any text above and still see how easy the steps are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*8CgN9oW3FVjkf-Lc-iA7Rg.gif" /><figcaption>One of the ways to create a checkpoint: Edit Breakpoint expression to create a Checkpoint. (Checkpoint has = symbol inside the red dot)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*Y3fnqESfCI9EMBhxQ_dPBQ.gif" /><figcaption>You can now easily run a debug test by simply clicking ‘Debug Test’ above the test method.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXpqCZtY7z6GPe9IROOZlw.gif" /><figcaption>Once test runs and the log is loaded, IDE shows you the first breakpoint/checkpoint in the test execution. You can see the values of local variables at the point of testing.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i89CZJMRVE2BA-IiMm7-_A.gif" /><figcaption>If you click Continue or press F5, it will take you to the next breakpoint/checkpoint in the test execution.</figcaption></figure><p>It really takes <strong>way</strong> less than adding the System debug logs, so you should give it a try today!</p><ul><li>Apex Replay Debugger: <a href="https://developer.salesforce.com/tools/vscode/en/apex/replay-debugger">https://developer.salesforce.com/tools/vscode/en/apex/replay-debugger</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cff5c0215fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SFDX Packaging & Metadata Unsupported by Unlocked Packages]]></title>
            <link>https://soobink.medium.com/sfdx-packaging-metadata-unsupported-by-unlocked-packages-37b50842deba?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/37b50842deba</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-devops]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[sfdx]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Wed, 20 Apr 2022 00:20:01 GMT</pubDate>
            <atom:updated>2022-04-20T00:20:01.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgCqocQcP8tbhIAY5WKaMg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sahandbabali?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sahand Babali</a> on <a href="https://unsplash.com/s/photos/box-cat?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>There are handful of metadata — mostly an org configurations — that are not supported by unlocked packages. You can easily check which metadata is covered in unlocked package from the Salesforce official document on <a href="https://mdcoverage.secure.force.com/docs/metadata-coverage/54">Metadata Coverage</a>. There are many ways to handle them, from purely manual to mostly automated.</p><h3>What Steps to Consider?</h3><p>There are handful of pre- and post-deployment steps to consider when getting started with CI/CD process with Unlocked packages. Complex setups like Omni-channel and email-to-case require more attention to details than metadata that can easily be packaged.</p><h4>Metadata API &amp; SFDX Retrieve/Deploy</h4><p>Some setting/config related metadata is not covered by unlocked package. But majority of them still can be retrieved and deployed using Metadata API.</p><p>Separated from the project package folders, you can set up either a separate repo or a separate folder on the repo root to save the manifest file (package.xml) and metadata folders to store the metadata files. The manifest file can easily be built using examples from <a href="https://developer.salesforce.com/docs/atlas.en-us.234.0.api_meta.meta/api_meta/meta_intro.htm">Metadata API official documentation</a> to retrieve specific metadata.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ceef3b123b5bb8d2b851d5e1e74fab9/href">https://medium.com/media/0ceef3b123b5bb8d2b851d5e1e74fab9/href</a></iframe><p>Using the $sfdx force:source:retrieve -x path/to/package.xml command you can retrieve the specified metadata down to your current project. Just be sure to move it out of the default package folder so it doesn’t go through the packaging process (which will fail due to metadata coverage issue)</p><p>If you are wish to update existing metadata file that was retrieved before, you’ll just need to run $sfdx force:source:retrieve -p path/to/metadata/folder command, without worrying about moving files around.</p><p>Since those are most likely to be an org setups/configurations, those metadata will need to be deployed as a part of pre-deployment steps.</p><h4>Data Manipulation</h4><p>Certain configurations are system data that needs to be updated when changes are needed as a part of release. Some examples includes Custom Settings or <a href="https://help.salesforce.com/s/articleView?id=000351880&amp;type=1">Service Presence Status setup</a>. Those records/data will need to be queried and saved. And those records/data are likely to be deployed as a part of post-deployment steps.</p><h4>Complex Deployment Scenario</h4><p>There are still some settings (especially related to an Entitlement Process metadata) that includes both pre- and post-deployment steps. Entitlement Process metadata can be a part of unlocked package itself, but the deployment of the package can fail once it’s linked to an active Entitlement record in a target org.</p><h3>Manual Changes 🤟 and Automation 🤖</h3><p>You might not like seeing ‘Manual’ steps for SFDX development process (or for any development process). But compare your time and cost required to build an automated process vs. making certain configuration changes manually which usually doesn’t often change. Especially if you are handling a single org and there aren’t many customization and/or configuration that requires extra hands, making manual changes and documenting the process thoroughly would be your best choice.</p><p>While changes can be made manually, that doesn’t mean there is no way you can track those changes and build scalable process. Metadata retrieved by Metadata API and the records/data queried can easily be saved and tracked. Also those can easily be deployed to the target org using command line. It will be an easy ‘10-second setup’ to enable omni-channel once, or a version controlled metadata change deployed with Metadata API.</p><p>On the other hand, if there are many complex manual steps needed for every deployment, or the settings needs to be applied to multiple orgs, the cost of developing an automated process can be justified. The automated process will reduce human interference and make the deployment process scalable, on top of relieving a developer/release manager from working late night to run deployment steps manually.</p><pre>Example Manual, Programmatic &amp; Manual, Automated Process</pre><pre>+-----------+-------------------+---------------+------------------+<br>|           |                   | Deployment    |                  |<br>| Process   | Development       | Documentation | Deployment       |<br>+-----------+-------------------+---------------+------------------+<br>|           | Document literal  |               | Following        |<br>|           | steps to make     | Text-based    | how-to           |<br>| Manual    | desired changes.  | how-to steps  | documentation    |<br>+-----------+-------------------+---------------+------------------+<br>|           | Retrieve          |               |                  |<br>|           | metadata/data     | List of       |                  |<br>| Program-  | from development  | commands to   |                  |<br>| matic &amp;   | and commit the    | run with      | Running command  |<br>| Manual    | files             | instruction   | line commands    |<br>+-----------+-------------------+---------------+------------------+<br>|           | Retrieve          |               |                  |<br>|           | metadata/data     |               |                  |<br>|           | from development  |               | Handled by CD    |<br>|           | and commit the    |               | automation       |<br>| Automated | files             | N/A           | process          |<br>+-----------+-------------------+---------------+------------------+</pre><h3>DevOps is about everyone involved</h3><p>If you can magically implement automated CI/CD process for all the specific SFDX metadata types, there won’t be any issue or problem implementing it for all development team building out a development process with unlocked packages. But the reality is, it is very hard and almost impossible to find every single edge cases of deploying a metadata before actually hitting those issues directly. It means there will be bumps on the development pipeline every once in a while, more often during early stages of the new process.</p><p>It’s normal to feel frustrated and helpless when the promised ‘better’ process is blocking your simple org changes that would have taken you less than 10 minutes to do it manually. Having a clear expectation of the process and providing a guide line on what to do — <em>ex. If the metadata type included in your work is not covered by unlocked package, document your process in XXX document location and create ticket for DevOps team </em>— when they hit those bumps will help everyone to work as a team and polish the development pipeline one metadata at a time! 🎉</p><p>Resourced &amp; More to Read</p><ul><li><a href="https://mdcoverage.secure.force.com/docs/metadata-coverage/54">Metadata Coverage</a></li><li><a href="https://developer.salesforce.com/docs/atlas.en-us.234.0.api_meta.meta/api_meta/meta_intro.htm">Metadata API Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37b50842deba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to Scratch Org Definition JSON]]></title>
            <link>https://soobink.medium.com/intro-to-scratch-org-definition-json-b82f44566950?source=rss-83a69797f6ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/b82f44566950</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[sfdx]]></category>
            <dc:creator><![CDATA[Soobin Kittredge]]></dc:creator>
            <pubDate>Sun, 13 Mar 2022 04:59:47 GMT</pubDate>
            <atom:updated>2022-03-13T04:59:47.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BgQNFJXIbfU8tUhVZlIOpA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@filmlav?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Fernando Lavin</a> on <a href="https://unsplash.com/photos/ocUAiaMTCM0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Scratch org is the central piece of SFDX process. Thanks to its speedy creation, wide range of possible configurations and being able to be created from command line, It’s used for almost every step of the automated development pipeline — development, validation, and testing.</p><p>For purpose of developing and customizing, it’s important to match your scratch org’s configuration to Production org. Any add-on feature or setting discrepancy between the two environment can lead to a piece of metadata going into a package and causing an issue during deployment, or cause missing customization especially if the package touches standard objects/fields. It can also cause failure to push source pulled down from a production environment to a scratch org.</p><p>One example of above issue is with <strong>Enhanced Note</strong> setting. When Enhanced Note setting is not enabled (default) ‘New Note’ quick actions added to a page layout has a quick action API name of NewNote . However, when enabled, the same ‘New Note’ quick action has a different API name of FeedItem.ContentNote . This used to cause a deployment failure with an error No QuickAction named NewNote found if the package was created with a page layout updated in an scratch org without enhanced note enabled. (<em>* It seems like this was patched and now the error is ignored, you just won’t see the ‘New Note’ in the quick action section even if that was added in the metadata file</em>)</p><h3>Scratch org definition JSON file</h3><p>When you create a default Salesforce project, it comes with a very basic scratch org definition file in a config folder. The default file defers based on the project template. Following is the default project-scratch-def.json file from a project created with Standard template:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cecbf752661def139726c7ecbbd8d239/href">https://medium.com/media/cecbf752661def139726c7ecbbd8d239/href</a></iframe><p>And this is the same file from a project created with Empty template:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e6b775cc0ae68393b0283a6233f0dea/href">https://medium.com/media/0e6b775cc0ae68393b0283a6233f0dea/href</a></iframe><h4>“edition”</h4><p>Edition of the scratch org can be one of following four values: Developer, Enterprise, Group, Professional. <em>(ISV partners with Partner edition scratch orgs are available.)</em></p><p>For people with high-tier editions: There’s no option for Unlimited and I think that might be because there are only handful of business/service related differences between the Unlimited and Enterprise edition (other than higher limits and storage — general things that comes with more budget.) Based on the <a href="https://help.salesforce.com/s/articleView?id=sf.overview_limits_general.htm&amp;type=5">documentation</a>, if your org uses Unlimited edition, using an Enterprise edition for scratch org definition should be sufficient.</p><p>There is a 2 user limit for a Developer edition, so if you create a scratch org as Developer edition you won’t be able to create 1 extra user. Also there are certain settings that are enabled for Developer edition which will be included in certain metadata pulled down from the Developer edition scratch org and cause issue (ex. <a href="https://help.salesforce.com/s/articleView?id=000352194&amp;type=1">Data.com Prospector causing deployment error</a>)</p><h4>“features”</h4><p>You can visit the <a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm#sfdx_dev_scratch_orgs_def_file_config_values">official documentation page</a> to view the whole list of features you can enable. Here are just a handful features to watch out for:</p><ul><li>EnableSetPasswordInApi : Only feature enabled by default from the Standard project template. This allows setting up a password using command line, which is useful when creating a scratch org for a UAT purpose from an automated process.</li><li>FieldAuditTrail (Salesforce Shield Feature) : This allows you to track field history up to 60 fields (40 additional fields) But if your production org does not have this feature, packages containing 20+ fields configured with history tracking will fail to deploy.</li><li>PlatformEncryption (Salesforce Shield Feature) : This helps anyone assessing the usage and impact of Platform encryption before considering purchase of the Salesforce Shield</li></ul><h4>“settings”</h4><p>The two settings included in default definition file are to 1) <a href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_lightningexperiencesettings.htm">enable Lightning Experience</a> and 2) <a href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_mobilesettings.htm">disable browser caching,</a> optimizing scratch org for lightning development.</p><p>You can see the full list of Settings metadata types from the <a href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_settings.htm">official documentation page</a> and pick settings you’d like to add to the scratch org definition file.</p><p>You can easily retrieve settings of your org utilizing package.xml and SFDX command sfdx force:source:retrieve -x package.xml (-x path to the below package.xml file). This will retrieve Settings Metadata down to your default project folder under main/default/settings path.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/359181ad52b455b607fb62b402528a59/href">https://medium.com/media/359181ad52b455b607fb62b402528a59/href</a></iframe><p>The wildcard * will retrieve every Setting metadata. You can also list specific settings if you know which settings you are looking to retrieve.</p><p>For example, if your org has email-to-case and HTML email enabled, you can retrieve either the whole Settings metadata with wildcard and search for emailToCase in the retrieved folder, or specify &lt;members&gt;caseSettings&lt;/member&gt; to only retrieve the relevant metadata. Once you have the metadata, copy over the setting names and values into the scratch org definition file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KTxr5D-5LL6aj5OyhC_rVQ.png" /></figure><p>Just to be sure to use a lower camel case when copying the setting labels into the scratch org definition settings ( CaseSettings → caseSettings )</p><p>If you make any typo mistakes, following error will show up and settings will not be applied to the newly created scratch org:</p><pre>ERROR running force:org:create:  A scratch org was created with username <a href="/service/mailto:test-dbej6jmf5xrc@example.com">test-dbej6jmf5xrc@example.com</a>, but the settings failed to deploy</pre><p>Don’t be alarmed, just double check your definition json file and fix any typo.</p><h4>… and more configurations!</h4><p>You can setup OWD sharing settings for objects for orgs with complicated sharing setting, specify scratch org to be in release preview (during release transition period) to test out release features and test package comparability, or even create your own custom scratch org field when needed. <a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm">All the configuration available for the definition file is also available on the official documentation page</a>.</p><h3>Org Shapes feature is in Beta</h3><p>Salesforce is actively working on helping you to have a proper scratch org definition file that reflects production Salesforce org —<a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_shape_intro.htm"> Org Shapes.</a> It’s in beta preview right now, but creating and maintaining proper scratch org definition file will be much easier when this feature comes out as GA. Until then, keep on playing around and testing around with the definition file!</p><h3>More Reads/Resources</h3><ul><li><a href="https://help.salesforce.com/s/articleView?id=sf.overview_limits_general.htm&amp;type=5">Salesforce Features and Edition Allocations</a></li><li>Salesforce DX Developer Guide — <a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm">Build Your Own Scratch Org Definition File</a></li><li>Salesforce DX Developer Guide — <a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_shape_intro.htm">Create a Scratch Org Based on an Org Shape (Beta)</a></li><li>Metadata API Developer Guide — <a href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_settings.htm">Settings</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b82f44566950" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>