<?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 Abinaya Mettupatti Sivagnanam on Medium]]></title>
        <description><![CDATA[Stories by Abinaya Mettupatti Sivagnanam on Medium]]></description>
        <link>https://medium.com/@abinayasiva88?source=rss-bc47b1b9b38d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SwQrELNN4rOYwnK7WdpviA.jpeg</url>
            <title>Stories by Abinaya Mettupatti Sivagnanam on Medium</title>
            <link>https://medium.com/@abinayasiva88?source=rss-bc47b1b9b38d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:31:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abinayasiva88/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[Salesforce Developer Console vs. Web Console: A Practical Feature Map]]></title>
            <link>https://medium.com/@abinayasiva88/salesforce-developer-console-vs-web-console-a-practical-feature-map-13d5bdb735b9?source=rss-bc47b1b9b38d------2</link>
            <guid isPermaLink="false">https://medium.com/p/13d5bdb735b9</guid>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce-winter-27]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-new-feature]]></category>
            <dc:creator><![CDATA[Abinaya Mettupatti Sivagnanam]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 17:07:43 GMT</pubDate>
            <atom:updated>2026-10-04T18:06:43.933Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Where to run SOQL, execute Anonymous Apex, inspect logs, check coverage, and edit LWC -plus the gaps that still matter.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xx3dLnDpKFGrSPeIjvO8xA.png" /><figcaption>Developer Console to Web Console</figcaption></figure><p>Salesforce Web Console is generally available. If you have years of muscle memory in Developer Console, the first question is practical: <strong>where did my everyday tasks go?</strong></p><p>Web Console is a browser-based IDE built on VS Code for the Web. It adds capabilities Developer Console never had, especially LWC editing and a broader metadata browser. But the two tools are not identical. In particular, Developer Console still has a more capable visual Log Inspector. This guide maps the tasks and shows a small example you can run in your own org.</p><h3>The feature map</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k1FWjTynD_oiuhwWHvyr5Q.png" /><figcaption>Table 1. Developer Console vs. Web Console: common Salesforce development tasks, based on Salesforce documentation as of October 2026.</figcaption></figure><p>The shortest summary: Anonymous Apex, SOQL, Apex tests, code coverage, debug logs, and Apex editing are available in Web Console. LWC editing is an addition. Log analysis remains a meaningful limitation.</p><h3>First, get into Web Console</h3><p>At general availability, Web Console is enabled by default for users with admin permissions. Open the gear menu in Salesforce and select <strong>Web Console</strong>. Administrators can manage org-wide availability under <strong>Setup → Development → Web Console</strong> and can enable Developer Console there as well.</p><p>Salesforce’s <a href="https://developer.salesforce.com/docs/platform/webconsole/guide/faq.html?utm_source=chatgpt.com">Web Console FAQ</a> and <a href="https://developer.salesforce.com/docs/platform/webconsole/guide/enable-ide.html?utm_source=chatgpt.com">setup guide</a> say users need <strong>Web Console User</strong> and <strong>View All Data</strong> permissions. The FAQ also says users need <strong>Use Any API Client</strong> if API Access Control is enabled in the org; Salesforce’s <a href="https://developer.salesforce.com/docs/platform/webconsole/guide/troubleshooting.html?utm_source=chatgpt.com">troubleshooting guide</a> specifically identifies that permission for <strong>Run Query</strong>. These are substantial permissions; assign them through your normal access review. Web Console is not yet available in Salesforce Government Cloud environments, according to the FAQ.</p><p>Most actions below start in the <strong>Command Palette</strong>: press <strong>Ctrl+Shift+P</strong> on Windows or Linux, or <strong>Cmd+Shift+P</strong> on macOS, then search for the named command.</p><h3>1. Run SOQL</h3><p>In Developer Console, you open <strong>Query Editor</strong>, enter a query, and execute it. In Web Console, open the Command Palette and choose <strong>SFDX: Create Query in SOQL Builder</strong> for a visual query builder, or <strong>SFDX: Create SOQL Query</strong> for a text query. Select <strong>Run Query</strong>.</p><p>Try this read-only query:</p><pre>SELECT Id, Name, CreatedDate<br>FROM Account<br>ORDER BY CreatedDate DESC<br>LIMIT 5</pre><p>The SOQL Builder is useful for a quick object, field, filter, sort, and limit selection. For more complex queries, use the text editor. Web Console can display results in a grid and save them as CSV or JSON.</p><p><strong>A distinction to check before migrating:</strong> Developer Console’s Query Editor supports both SOQL and SOSL. Salesforce’s Web Console documentation describes SOQL execution, but does not document a direct SOSL Query Editor equivalent. That is a documentation-based observation, not a claim that every possible SOSL route is impossible.</p><h3>2. Execute Anonymous Apex</h3><p>Developer Console’s <strong>Debug -&gt; Open Execute Anonymous Window</strong> becomes a script-based flow. In Web Console, use <strong>SFDX: Create Anonymous Apex Script</strong>, enter your code, then right-click in the script and choose <strong>SFDX: Execute Anonymous Apex</strong>.</p><p>This example reads five Accounts and writes their IDs and names to a debug log:</p><pre>List&lt;Account&gt; accounts = [<br>    SELECT Id, Name<br>    FROM Account<br>    ORDER BY CreatedDate DESC<br>    LIMIT 5<br>];<br>System.debug(JSON.serializePretty(accounts));</pre><p>It does not change records. In a shared org, choose data that is appropriate to print to a debug log; debug output can be visible to people with log access.</p><h3>3. Run tests and inspect code coverage</h3><p>Use the <strong>Testing</strong> view (the beaker icon) to run one test method, one test class, or all Apex tests. You can also run a test from an open class. Results appear in the Output panel, and failures can take you to the relevant code.</p><p>For coverage, enable <strong>retrieve-test-code-coverage</strong> in workspace settings and rerun the tests. Salesforce documents coverage percentages in Output and coverage highlighting in the editor. If coverage looks empty, check this setting before concluding that Web Console cannot show it.</p><h3>4. Generate and retrieve debug logs</h3><p>Use <strong>SFDX: Create Trace Flag for Current User</strong> to start tracing, adjust log levels as needed, reproduce the issue, then use <strong>SFDX: Get Apex Debug Logs</strong> to retrieve the log.</p><p>This is a significant workflow difference. Salesforce’s own comparison says Developer Console provides multiple log views and source navigation from a log, whereas Web Console currently displays logs as raw text without an external visualization tool or extension. Salesforce’s GA announcement lists richer log analysis as coming later. For complex transaction tracing, keeping Developer Console available is a reasonable choice.</p><h3>5. Edit Apex, LWC, and other metadata</h3><p>From <strong>Setup -&gt; Apex Classes</strong> or <strong>Apex Triggers</strong>, select <strong>Edit</strong> to open the item in Web Console. For LWC or other metadata, use the <strong>Org Browser</strong> (cloud icon), find the component, select <strong>Retrieve Metadata</strong>, then edit it in the project view.</p><p>The production boundary matters: Salesforce says Apex is read-only in production Web Console. In a sandbox or other non-production org, saved changes deploy directly to that org. That makes Web Console useful for investigation and small fixes, but a saved sandbox edit still needs to enter your team’s source control, review, and release flow.</p><h3>My practical recommendation</h3><p>Use Web Console for quick in-org investigation, SOQL, Anonymous Apex, tests, and browsing or editing metadata in a non-production org. Keep Developer Console enabled when its visual Log Inspector or direct SOSL Query Editor is central to your workflow. For coordinated team delivery, continue to treat Git and your established deployment pipeline as the source of truth.</p><p>The useful question is not whether Web Console “replaces” Developer Console on a feature checklist. It is whether your most frequent debugging path has become faster. Which task would you still open Developer Console for?</p><h3>Sources</h3><ul><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/dev-vs-web.html">Salesforce: Developer Console vs. Web Console</a></li><li><a href="https://developer.salesforce.com/blogs/2026/09/announcing-general-availability-web-console-your-modern-in-browser-ide">Salesforce: Web Console GA announcement and quick start</a></li><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/faq.html">Salesforce: Web Console FAQ, permissions, and availability</a></li><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/query-builder.html">Salesforce: Query Builder and query execution</a></li><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/webconsole-apex-tests.html">Salesforce: Test Apex code and coverage</a></li><li><a href="https://help.salesforce.com/s/articleView?id=sf.code_dev_console_tab_query_editor_soql_sosl.htm&amp;language=en_US&amp;type=5">Salesforce: Developer Console SOQL and SOSL Query Editor</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13d5bdb735b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Salesforce Feature Most Developers Ignore , And Why It’s Fixing All Your Hardcoding Problems]]></title>
            <link>https://medium.com/@abinayasiva88/the-salesforce-feature-most-developers-ignore-and-why-its-fixing-all-your-hardcoding-problems-270f53a73d69?source=rss-bc47b1b9b38d------2</link>
            <guid isPermaLink="false">https://medium.com/p/270f53a73d69</guid>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[admin]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[apex]]></category>
            <dc:creator><![CDATA[Abinaya Mettupatti Sivagnanam]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 12:21:24 GMT</pubDate>
            <atom:updated>2026-02-26T12:21:24.165Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Custom Metadata Types exist. Most devs just keep hardcoding anyway.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8rxmc7RIaD1IWJDgiIUx-A.png" /><figcaption>From hardcoded chaos to Custom Metadata clarity: A technical illustration of Salesforce best practices.</figcaption></figure><p>Ask a Salesforce developer how they handle configurable values in Apex — thresholds, status mappings, routing logic — and most will say one of two things:</p><p><em>“I hardcoded it.”</em> or <em>“I used a Custom Setting.”</em></p><p>Both answers make me wince. Because there’s a better tool that’s been sitting in Salesforce since 2015, ships with the org, deploys with changesets and packages, and almost nobody reaches for it.</p><p><strong>Custom Metadata Types.</strong></p><p>Here’s why you should care, and how to actually use them.</p><h3>What’s Wrong With What You’re Already Doing</h3><p><strong>Hardcoding</strong> breaks across environments, creates invisible dependencies, and requires a deployment every time a business value changes. You already know this. Yet you still do it at 4pm on a Friday when the deadline hits.</p><p><strong>Custom Settings</strong> feel like the right answer — configurable, no deployment needed. But here’s the catch: Custom Settings are data. They don’t deploy with your metadata. Which means every time you spin up a new sandbox or do an org migration, someone has to manually recreate them. That someone is usually you, six months later, when everything mysteriously breaks.</p><h3>What Custom Metadata Types Actually Do Differently</h3><p>Custom Metadata Types (CMTs) are treated as <strong>metadata, not data</strong>. That means:</p><ul><li>They deploy with your changesets, packages, and scratch orgs automatically</li><li>They survive sandbox refreshes without manual recreation</li><li>They’re queryable in Apex without consuming SOQL limits in most contexts</li><li>They’re version-controllable in source format alongside your code</li></ul><p>This isn’t a minor difference. It fundamentally changes how you manage configuration across environments.</p><h3>A Real Example: Replacing Hardcoded Logic</h3><p>Say you have escalation logic that triggers when a amount crosses a threshold. Here’s how most devs write it:</p><p>apex</p><pre>// ❌ The classic mistake<br>if (Amount__c &gt; 5000) {<br>    triggerEscalation();<br>}</pre><p>That 5000 is now buried in code. Business wants it changed to 7500? That’s a developer ticket, a deployment, and a release window for a one-number change.</p><p>Here’s the CMT version:</p><p><strong>Step 1 — Create your Custom Metadata Type</strong> Setup → Custom Metadata Types → New Add a field: Escalation_Threshold__c (Number) Create a record: Default with value 5000</p><p><strong>Step 2 — Query it in Apex</strong></p><p>apex</p><pre>// ✅ The right way<br>sObject_Config__mdt config = sObject_Config__mdt.getInstance(&#39;Default&#39;);<br>if (sObject.Amount__c &gt; config.Escalation_Threshold__c) {<br>    triggerEscalation(sObject);<br>}</pre><p>Now your threshold lives in metadata. An admin can update it without touching code. It deploys automatically. And it works the same in every environment.</p><h3>Other Things You Should Stop Hardcoding Right Now</h3><p>Custom Metadata Types can replace hardcoded values across almost every common pattern:</p><p><strong>Status mappings</strong></p><p>apex</p><pre>// Instead of if/else chains mapping string statuses<br>Case_Status_Map__mdt mapping = Case_Status_Map__mdt.getInstance(inboundStatus);<br>String sfStatus = mapping.Salesforce_Status__c;</pre><p><strong>Email routing rules</strong></p><p>apex</p><pre>// Instead of hardcoded email addresses in Apex<br>Notification_Config__mdt config = Notification_Config__mdt.getInstance(&#39;Billing&#39;);<br>String toAddress = config.Recipient_Email__c;</pre><p><strong>Integration endpoints and parameters</strong></p><p>apex</p><pre>// Instead of hardcoded URLs or version strings<br>Integration_Settings__mdt settings = Integration_Settings__mdt.getInstance(&#39;PaymentGateway&#39;);<br>String endpoint = settings.Base_URL__c;</pre><h3>The One Limitation Worth Knowing</h3><p>CMTs are read-only at runtime — you can’t update them programmatically from Apex. If you need values that get written to dynamically (like counters or user-specific preferences), Custom Settings or custom objects are still the right call. But for configuration values that change rarely and need to deploy reliably? Custom Metadata Types win every time.</p><h3>The Takeaway</h3><p>If you’re hardcoding a value that could ever change, or using Custom Settings for org-wide configuration, ask yourself: should this be a Custom Metadata Type?</p><p>Nine times out of ten, the answer is yes.</p><p>It takes five extra minutes to set up. It saves five hours of debugging later. And it’s the kind of decision that separates developers who build things that last from developers who build things that work until they don’t.</p><p><em>Still reaching for hardcoded values? Try one Custom Metadata Type on your next ticket. You won’t go back.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=270f53a73d69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stay Ahead of Salesforce Org Limits: Alerts That Matter, Insights on Demand]]></title>
            <link>https://medium.com/@abinayasiva88/stay-ahead-of-salesforce-org-limits-alerts-that-matter-insights-on-demand-8e363cf66933?source=rss-bc47b1b9b38d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e363cf66933</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-admin]]></category>
            <category><![CDATA[appexchange]]></category>
            <dc:creator><![CDATA[Abinaya Mettupatti Sivagnanam]]></dc:creator>
            <pubDate>Fri, 21 Nov 2025 01:52:53 GMT</pubDate>
            <atom:updated>2026-04-29T22:51:09.531Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever had a deployment derailed by <strong>Salesforce org limits</strong>, you know the pain: confused users, delayed releases, and a scramble to figure out what went wrong. I built <strong>OrgLimit Monitor</strong> to flip that script , so you see risks <em>before</em> they hit and act with confidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PUilXg9zoDhX1tnSijlxyg.jpeg" /></figure><h3>TL;DR</h3><ul><li><strong>Monitor</strong> the Salesforce limits that actually matter to you</li><li><strong>Alert</strong> the right people when thresholds or <strong>spikes</strong> occur</li><li><strong>Trend</strong> usage with <strong>90-day history</strong> for planning and audits</li><li>100% native <strong>Apex + LWC</strong>. No external services. Easy setup.</li></ul><h4><a href="https://appexchange.salesforce.com/appxListingDetail?listingId=daa4f8c0-64a9-4454-bec5-b604c032a37c">https://appexchange.salesforce.com/appxListingDetail?listingId=daa4f8c0-64a9-4454-bec5-b604c032a37c</a></h4><h3>The Problem: Limits Sneak Up at the Worst Time</h3><p>Imports, integrations, report bursts, or seasonal peaks can chew through limits quickly. By the time someone notices, it’s too late. You need <strong>proactive visibility</strong>, not forensic analysis after an outage.</p><h3>Meet OrgLimit Monitor</h3><p>A native Salesforce app that:</p><ul><li>Sends <strong>threshold alerts</strong> when usage crosses your set %</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GmCpC1H0uofiQQt8.png" /><figcaption>Color-coded bars: green = safe, yellow = near threshold, red = threshold met or exceeded.</figcaption></figure><ul><li>Detects <strong>sudden spikes</strong> (e.g., &gt;10% jump since the previous run)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jqirRiMlttrJnfhhxbdzgQ.png" /><figcaption>“URGENT: Organization Limit Usage Spike Alert” email highlighting sudden &gt;10% increases.</figcaption></figure><ul><li>Captures <strong>daily snapshots</strong> for reporting and dashboards</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ypWfsX3bIW088clTu3gfOg.png" /><figcaption>Daily Organization Limits Summary” email showing monitored limits and full limits table.</figcaption></figure><ul><li>Lets admins choose <strong>which limits</strong> to watch and set <strong>per-limit thresholds</strong></li><li>Keeps a <strong>90-day history</strong> to plan capacity and explain incidents</li></ul><h3>How It Works (Simple)</h3><ol><li><strong>Pick your limits</strong> (e.g., SingleEmail, DailyApiRequests) and set thresholds in the LWC.</li><li><strong>Schedule jobs</strong>: <strong>Daily</strong> -full snapshot of all limits for reporting &amp; <strong>Frequent -</strong>hourly or every 15 minutes for monitored limits only (faster spike detection)</li><li><strong>Get alerts</strong>: When thresholds or spikes are detected, <strong>opted-in users</strong> receive emails.</li><li><strong>See trends</strong>: Use the included reports and dashboard to spot patterns and plan ahead.</li></ol><h3>Why Teams Use It</h3><ul><li><strong>Prevent outages</strong> during busy periods and big releases</li><li><strong>Stay native</strong> — no new servers, connectors, or security reviews for external services</li></ul><h3>Key Features</h3><ul><li><strong>Smart alerts</strong> for thresholds and fast spikes</li><li><strong>Daily snapshots</strong> + <strong>frequent checks</strong> for selected limits</li><li><strong>90-day history</strong> for dashboards and audits</li><li><strong>Admin LWC</strong> — configure in minutes</li><li><strong>Targeted emails</strong> — only to users who opt in</li><li><strong>No external callouts or secrets</strong></li></ul><h3>Setup in Minutes</h3><ol><li>Assign the provided <strong>permission set</strong></li><li>Add the “<strong>Receive Org Limit Alert</strong>” checkbox to the <strong>User</strong> layout</li><li>Choose limits, set thresholds, <strong>Save</strong></li><li>Schedule <strong>Daily</strong> and optional <strong>Frequent</strong> jobs</li><li>Share the report folder with your team</li></ol><h3>Who Benefits</h3><ul><li><strong>Admins</strong> who need proactive visibility</li><li><strong>Release/DevOps</strong> teams guarding deployments</li><li><strong>Ops/Support</strong> teams handling incidents and SLAs</li></ul><h3>Real-World Examples</h3><ul><li><strong>Email safety:</strong> Keep <strong>SingleEmail</strong> usage under control during campaigns</li><li><strong>API health:</strong> Watch <strong>DailyApiRequests</strong> so integrations don’t throttle</li><li><strong>Reporting bursts:</strong> Track <strong>HourlyAsyncReportRuns</strong> before end-of-month rush</li></ul><h3>FAQs</h3><p><strong>Is it mobile-friendly?</strong><br> Yes -runs in the Salesforce mobile app like any Lightning app.</p><p><strong>Does it use external services?</strong><br> No. It’s 100% native to Salesforce.</p><p><strong>How fast can I see spikes?</strong><br> Use the <strong>frequent job</strong> (hourly or every 15 minutes) for near-real-time checks.</p><h3>Try It</h3><p>Ready to monitor limits <strong>before</strong> they become incidents?</p><ul><li>AppExchange: <a href="https://appexchange.salesforce.com/appxListingDetail?listingId=daa4f8c0-64a9-4454-bec5-b604c032a37c">https://appexchange.salesforce.com/appxListingDetail?listingId=daa4f8c0-64a9-4454-bec5-b604c032a37c</a></li></ul><p><strong>Proactive org-limit monitoring: alerts that matter, insights on demand.</strong></p><p>If you found this helpful, give the app a try — and drop a review so other admins can discover it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e363cf66933" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Guessing: Use UserRecordAccess to Debug Sharing in 60 Seconds]]></title>
            <link>https://medium.com/@abinayasiva88/stop-guessing-use-userrecordaccess-to-debug-sharing-in-60-seconds-50c9bf429c3a?source=rss-bc47b1b9b38d------2</link>
            <guid isPermaLink="false">https://medium.com/p/50c9bf429c3a</guid>
            <category><![CDATA[record-access]]></category>
            <category><![CDATA[salesforce-field-access]]></category>
            <category><![CDATA[salesforce-user-access]]></category>
            <category><![CDATA[salesforce-access-issue]]></category>
            <category><![CDATA[permission-check]]></category>
            <dc:creator><![CDATA[Abinaya Mettupatti Sivagnanam]]></dc:creator>
            <pubDate>Mon, 10 Nov 2025 02:14:48 GMT</pubDate>
            <atom:updated>2025-11-10T02:14:48.372Z</atom:updated>
            <content:encoded><![CDATA[<p>Run one SOQL query and you’ll know if a user can <strong>read</strong>, <strong>edit</strong>, <strong>delete</strong>, or <strong>transfer</strong> a record. If the user lacks access, check the object’s *Share table (like AccountShare) to see <strong>how</strong> sharing works (owner, role, rule, team, manual, Apex-managed).</p><figure><img alt="UserRecordAccess 60 Seconds Debug" src="https://cdn-images-1.medium.com/max/1024/1*pBis6LIH7bd9z3mQB4SiGg.png" /></figure><h3>When to use this</h3><ul><li>“Why can’t Sarah see this Case?”</li><li>“John can read the Opportunity but can’t edit — why?”</li><li>“We changed roles — who lost access?”</li></ul><h3>The 60-second recipe</h3><ol><li><strong>Get the user’s Id</strong> (Setup → Users → open the user → copy the 15/18-char Id).</li><li><strong>Get the record Id</strong> (from the URL: …/lightning/r/&lt;Object&gt;/&lt;RecordId&gt;/view).</li><li><strong>Run this query</strong> (Developer Console → Query Editor or SOQL Builder)</li></ol><pre>SELECT<br>  RecordId,<br>  HasReadAccess,<br>  HasEditAccess,<br>  HasDeleteAccess,<br>  HasTransferAccess,<br>  MaxAccessLevel<br>FROM UserRecordAccess<br>WHERE UserId = &#39;005XXXXXXXXXXXX&#39;      /* the user you’re checking */<br>  AND RecordId = &#39;001XXXXXXXXXXXX&#39;    /* the record you’re checking */</pre><p>4. <strong>Read the flags:</strong></p><ul><li>HasReadAccess = true → user can see it</li><li>HasEditAccess = true → user can update it</li><li>HasDeleteAccess = true → user can delete it</li><li>HasTransferAccess = true → user can change ownership</li><li>MaxAccessLevel → the highest level possible for this user on that record</li></ul><h3>Quick variants (copy/paste)</h3><p><strong>A) Check many records at once (top 50):</strong></p><pre>SELECT RecordId, HasReadAccess, HasEditAccess<br>FROM UserRecordAccess<br>WHERE UserId = &#39;005XXXXXXXXXXXX&#39;<br>ORDER BY RecordId<br>LIMIT 50</pre><p><strong>B) Find which of a set is invisible to the user:</strong></p><pre>SELECT RecordId<br>FROM UserRecordAccess<br>WHERE UserId = &#39;005XXXXXXXXXXXX&#39;<br>  AND RecordId IN (&#39;001AAA...&#39;,&#39;001BBB...&#39;,&#39;001CCC...&#39;)<br>  AND HasReadAccess = false</pre><p><strong>C) Triage a whole object (sample 100 Accounts):</strong></p><pre>SELECT ura.RecordId, ura.HasReadAccess, ura.HasEditAccess<br>FROM UserRecordAccess ura<br>WHERE ura.UserId = &#39;005XXXXXXXXXXXX&#39;<br>AND ura.RecordId IN (SELECT Id FROM Account LIMIT 100)</pre><h3>“I still don’t know why access is missing.” (next 2 minutes)</h3><p>UserRecordAccess tells you <strong>what</strong> access a user has, not always <strong>why</strong>. To learn the why, check the object’s share table and groups:</p><h3>1) Inspect the object’s *Share table</h3><p>(Example below uses <strong>Account</strong>. Replace with CaseShare, OpportunityShare, etc.)</p><pre>SELECT ParentId, UserOrGroupId, RowCause, AccessLevel<br>FROM AccountShare<br>WHERE ParentId = &#39;001XXXXXXXXXXXX&#39;</pre><ul><li><strong>AccessLevel</strong>: Read/Write, Read Only</li><li><strong>RowCause</strong> (why sharing exists):</li><li>Owner (they own it)</li><li>Rule (sharing rule)</li><li>Territory, Team, Manual, ApexManaged, etc.</li></ul><h3>2) Expand groups and queues (record might be shared via a group)</h3><pre>/* Who’s in the groups that might have access? */<br>SELECT Id, Name, Type FROM Group WHERE Type IN (&#39;Regular&#39;,&#39;Role&#39;,&#39;Territory&#39;)</pre><pre>/* Map group members */<br>SELECT GroupId, UserOrGroupId<br>FROM GroupMember<br>WHERE GroupId IN (&#39;00GXXXXXXXXXXXX&#39;,&#39;00GYYYYYYYYYYYY&#39;)</pre><p>If the share row points to a <strong>Group</strong>, check <strong>GroupMember</strong> to see whether the user is included through a role, territory, public group, or queue.</p><h3>Fast decision guide</h3><p><strong>HasReadAccess = false?</strong></p><ol><li>Check <strong>OWD</strong> (org-wide defaults). If OWD = Private, user needs ownership, role/territory inheritance, a sharing rule, a team, or manual/Apex share.</li><li>Look for a row in *Share with this user (direct) or a <strong>group</strong> the user is in.</li></ol><p><strong>HasReadAccess = true but HasEditAccess = false?</strong></p><ol><li>Check AccessLevel in *Share (maybe ReadOnly).</li><li>Profile/Permission Sets might block <strong>Edit</strong> on the <strong>object/field</strong> (CRUD/FLS).</li><li>Validation rule or flow may be blocking updates (not a <em>sharing</em> issue).</li></ol><h3>Common pitfalls (and fixes)</h3><ul><li><strong>Pitfall:</strong> You query the share table but see nothing; still no access.<br> <strong>Fix:</strong> The user might be gaining access via <strong>role/territory hierarchy</strong> (not explicit shares). Confirm their <strong>Role</strong> and <strong>Parent Role</strong>.</li><li><strong>Pitfall:</strong> You grant a Read/Write share, but user still can’t edit.<br> <strong>Fix:</strong> Check <strong>FLS (Field-Level Security)</strong> and <strong>object CRUD</strong> in the profile/permission sets.</li><li><strong>Pitfall:</strong> You test with your own user Id instead of the target user.<br> <strong>Fix:</strong> Always set UserId = &#39;005…&#39; for the <strong>target</strong> user (or <strong>Login As</strong> them and run the same query).</li><li><strong>Pitfall:</strong> You rely only on MaxAccessLevel.<br> <strong>Fix:</strong> Use the individual flags (HasReadAccess, HasEditAccess, etc.) for precise answers.</li></ul><h3>Admin/Dev quick wins</h3><ul><li><strong>Saved query snippet:</strong> Keep the main UserRecordAccess query saved in SOQL Builder for copy/paste.</li><li><strong>“Share inspector” dashboard:</strong> A mini App with two tabs: 1) UserRecordAccess checker, 2) *Share + GroupMember explorer.</li><li><strong>Post-release checklist:</strong> After role/territory changes, spot check UserRecordAccess for key personas on key records.</li></ul><h3>FAQ (short answers)</h3><p><strong>Can I query access for any user?</strong><br> Yes, set UserId to the target user. (If your org’s security policies limit this, use <strong>Login As</strong> to run the query in their session.)</p><p><strong>Does this work for custom objects?</strong><br> Yes. Use UserRecordAccess for the “what,” and the object’s MyObject__Share table for the “why.”</p><p><strong>What about reports or list views?</strong><br> Those are separate filters/UI permissions. Start with UserRecordAccess, then check report/list permissions if the record access is fine.</p><h3>Copy block you can save</h3><pre>/* 60-second sharing check: paste user + record Ids */<br>SELECT<br>  RecordId, HasReadAccess, HasEditAccess, HasDeleteAccess, HasTransferAccess, MaxAccessLevel<br>FROM UserRecordAccess<br>WHERE UserId  = &#39;005XXXXXXXXXXXX&#39;<br>  AND RecordId = &#39;001XXXXXXXXXXXX&#39;;</pre><h3>Final takeaway</h3><p>Stop guessing. In one query, UserRecordAccess tells you <strong>exactly</strong> what access a user has to a record. If access is missing or too low, jump to the object’s *Share table and groups to find the reason—and fix it fast.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50c9bf429c3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REST vs Bulk vs Streaming in Salesforce]]></title>
            <link>https://medium.com/@abinayasiva88/rest-vs-bulk-vs-streaming-in-salesforce-1c181a72f2eb?source=rss-bc47b1b9b38d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c181a72f2eb</guid>
            <category><![CDATA[bulk-apis]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[live-streaming-api]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[saleforce]]></category>
            <dc:creator><![CDATA[Abinaya Mettupatti Sivagnanam]]></dc:creator>
            <pubDate>Sun, 05 Oct 2025 22:31:51 GMT</pubDate>
            <atom:updated>2025-10-05T22:31:51.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8wHknV5EP5-6RU7Q1mfaVg.png" /></figure><h3>The 5-Minute Decision Guide Every Developer Needs</h3><p>Hello developer! Tired of scratching your head wondering which Salesforce API to use? You’re not alone. Every day, developers face the same question: “Should I use REST, Bulk, or Streaming API for this project?”</p><p>Let’s cut through the confusion. In the next 5 minutes, you’ll know exactly which API to pick for any scenario. No more guessing, no more over-engineering. Just clear, practical guidance with real Apex code you can use today.</p><h3>The 5-Second Decision Tree</h3><p>Quick Text Summary:</p><p>1.~ 200/small set of records → REST API</p><p>2.200+ records → Bulk API</p><p>3.Need real-time updates → Streaming API</p><p><strong>That’s it!</strong> But let’s dive deeper so you understand the “why” behind each choice.</p><h3>Meet Your Three API Options</h3><ol><li>REST API</li></ol><p><strong>What it does:</strong> Perfect for small, quick operations. Think of it as your go-to tool for everyday tasks.</p><p><strong>Best for:</strong> Single record operations, real-time CRUD operations, mobile apps, quick integrations</p><p><strong>Sweet spot:</strong> Up to 200 records per call/operation</p><pre>// Simple REST API call in Apex<br>Http http = new Http();<br>HttpRequest request = new HttpRequest();<br>request.setEndpoint(&#39;callout:My_Named_Credential/services/data/v58.0/sobjects/Account&#39;);<br>request.setMethod(&#39;POST&#39;);<br>request.setHeader(&#39;Content-Type&#39;, &#39;application/json&#39;);<br><br>// Create a single account<br>Map&lt;String, Object&gt; accountData = new Map&lt;String, Object&gt;{<br>    &#39;Name&#39; =&gt; &#39;Acme Corp&#39;,<br>    &#39;Type&#39; =&gt; &#39;Customer&#39;,<br>    &#39;Phone&#39; =&gt; &#39;555–1234&#39;<br>};<br><br>request.setBody(JSON.serialize(accountData));<br>HttpResponse response = http.send(request);<br><br>if (response.getStatusCode() == 201) {<br>    System.debug(&#39;Account created successfully!&#39;);<br>    Map&lt;String, Object&gt; result = (Map&lt;String, Object&gt;) JSON.deserializeUntyped(response.getBody());<br>    String accountId = (String) result.get(&#39;id&#39;);<br>    System.debug(&#39;New Account ID: &#39; + accountId);<br>}</pre><p>2. Bulk API — The Heavy Lifter</p><p><strong>What it does:</strong> Handles large data volumes without breaking a sweat. Your best friend for data migrations and batch processes.</p><p><strong>Best for:</strong> Data migrations, ETL processes, mass updates, large imports/exports</p><p><strong>Sweet spot:</strong> 200+ records up to 10 million records</p><pre>// Bulk API 2.0 job creation in Apex<br>public class BulkAccountProcessor {<br>    <br>    public static void createBulkJob() {<br>        // Step 1: Create the job<br>        Http http = new Http();<br>        HttpRequest request = new HttpRequest();<br>        request.setEndpoint(&#39;callout:My_Named_Credential/services/data/v58.0/jobs/ingest&#39;);<br>        request.setMethod(&#39;POST&#39;);<br>        request.setHeader(&#39;Content-Type&#39;, &#39;application/json&#39;);<br>        <br>        Map&lt;String, Object&gt; jobData = new Map&lt;String, Object&gt;{<br>            &#39;object&#39; =&gt; &#39;Account&#39;,<br>            &#39;operation&#39; =&gt; &#39;insert&#39;,<br>            &#39;contentType&#39; =&gt; &#39;CSV&#39;<br>        };<br>        <br>        request.setBody(JSON.serialize(jobData));<br>        HttpResponse response = http.send(request);<br>        <br>        if (response.getStatusCode() == 200) {<br>            Map&lt;String, Object&gt; job = (Map&lt;String, Object&gt;) JSON.deserializeUntyped(response.getBody());<br>            String jobId = (String) job.get(&#39;id&#39;);<br>            <br>            // Step 2: Upload your CSV data<br>            uploadDataToJob(jobId);<br>        }<br>    }<br>    <br>    private static void uploadDataToJob(String jobId) {<br>        // Upload CSV data to the job<br>        String csvData = &#39;Name,Type,Phone\n&quot;Big Corp&quot;,&quot;Customer&quot;,&quot;555–9999&quot;\n&quot;Huge Inc&quot;,&quot;Prospect&quot;,&quot;555–8888&quot;&#39;;<br>        <br>        HttpRequest dataRequest = new HttpRequest();<br>        dataRequest.setEndpoint(&#39;callout:My_Named_Credential/services/data/v58.0/jobs/ingest/&#39; + jobId + &#39;/batches&#39;);<br>        dataRequest.setMethod(&#39;PUT&#39;);<br>        dataRequest.setHeader(&#39;Content-Type&#39;, &#39;text/csv&#39;);<br>        dataRequest.setBody(csvData);<br>        <br>        Http http = new Http();<br>        HttpResponse response = http.send(dataRequest);<br>        <br>        if (response.getStatusCode() == 200) {<br>            System.debug(&#39;Data uploaded successfully to job: &#39; + jobId);<br>        }<br>    }<br>}</pre><p>3. Streaming API — The Real-Time Watcher</p><p><strong>What it does:</strong> Pushes real-time notifications when data changes. Like having a security camera that alerts you instantly.</p><p><strong>Best for:</strong> Real-time dashboards, instant notifications, live data synchronization, chat applications</p><p><strong>Sweet spot:</strong> When you need to know about changes as they happen</p><pre>// Platform Event for Streaming API<br>// First, create a Platform Event: Account_Change__e<br>public class AccountStreamingHandler {<br>    <br>    // Publish an event when account changes<br>    public static void publishAccountChange(Id accountId, String changeType) {<br>        Account_Change__e event = new Account_Change__e(<br>            Account_Id__c = accountId,<br>            Change_Type__c = changeType,<br>            Timestamp__c = Datetime.now()<br>        );<br>        <br>        Database.SaveResult result = EventBus.publish(event);<br>        <br>        if (result.isSuccess()) {<br>            System.debug(&#39;Account change event published for: &#39; + accountId);<br>        }<br>    }<br>    <br>    // Subscribe to events (in a trigger or flow)<br>    public static void handleAccountChangeEvent(List&lt;Account_Change__e&gt; events) {<br>        for (Account_Change__e event : events) {<br>            System.debug(&#39;Account changed: &#39; + event.Account_Id__c + <br>                        &#39; — Change type: &#39; + event.Change_Type__c);<br>            <br>            // Your real-time processing logic here<br>            if (event.Change_Type__c == &#39;High_Value_Update&#39;) {<br>                // Trigger immediate notification to sales team<br>                sendInstantNotification(event.Account_Id__c);<br>            }<br>        }<br>    }<br>    <br>    private static void sendInstantNotification(Id accountId) {<br>        // Your notification logic<br>        System.debug(&#39;Sending instant notification for account: &#39; + accountId);<br>    }<br>}</pre><h3>Real-World Scenarios: Which API Should You Pick?</h3><p><strong><em>Scenario 1: Mobile App User Registration</em></strong></p><p><strong>Situation:</strong> Your mobile app needs to create user accounts one at a time as people sign up.</p><p><strong>Choice:</strong> REST API — Perfect for single, real-time operations.</p><p><strong>Why:</strong> You’re dealing with individual records that need immediate processing.</p><p><strong><em>Scenario 2: Nightly Data Import from Legacy System</em></strong></p><p><strong>Situation:</strong> Every night, you need to import 50,000 customer records from your old CRM.</p><p><strong>Choice:</strong> Bulk API — Built for this exact purpose.</p><p><strong>Why:</strong> Large volume, scheduled processing, no need for real-time response.</p><p><strong><em>Scenario 3: Sales Dashboard with Live Opportunity Updates</em></strong></p><p><strong>Situation:</strong> Your sales dashboard needs to show opportunities the moment they’re updated.</p><p><strong>Choice:</strong> Streaming API — Real-time is the key requirement here.</p><p><strong>Why:</strong> Users need instant visibility into changes as they happen.</p><p><strong><em>Scenario 4: Customer Service Portal — Case Creation</em></strong></p><p><strong>Situation:</strong> Customers create support cases through your web portal, one at a time.</p><p><strong>Choice:</strong> REST API — Simple, reliable, immediate response.</p><p><strong>Why:</strong> Single operations that need immediate confirmation to the user.</p><h3>Performance Reality Check</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9V7CADva87IRZzQYQEhBNg.png" /></figure><h3>Pro Tips That’ll Save Your Day</h3><p>💡 Pro Tip #1: <strong>The 200-Record Rule</strong><br>If you’re consistently hitting the 200+record limit with REST API, switch to Bulk API. Don’t try to work around it with multiple REST calls ,you’ll hit API limits and performance issues.</p><p>🚀 Pro Tip #2: <strong>Bulk API 2.0 vs 1.0</strong><br>Always use Bulk API 2.0. It’s simpler, faster, and more reliable. Bulk API 1.0 is legacy,avoid it unless you absolutely have to maintain existing code.</p><p>⚡ Pro Tip #3: <strong>Don’t Overuse Streaming</strong><br>Streaming API is powerful but can be overkill. If a 5-minute delay is acceptable, consider a scheduled job instead. Real-time comes with complexity costs.</p><p>🔧 Pro Tip #4: <strong>Hybrid Approach Works</strong><br>You can use multiple APIs in the same solution! For example: Bulk API for initial data load, REST API for individual updates, and Streaming API for critical notifications.</p><h3>🛠 Best Practices That Actually Matter</h3><h3>REST API Best Practices</h3><ul><li><strong>Use Named Credentials:</strong> Never hardcode endpoints or credentials in your code</li><li><strong>Handle Errors Gracefully:</strong> Always check HTTP response codes and handle failures</li><li><strong>Batch When Possible:</strong> Use composite resources to create/update multiple records in one call</li><li><strong>Mind the Limits:</strong> Monitor your daily API call usage</li></ul><h3>Bulk API Best Practices</h3><ul><li><strong>Use Bulk API 2.0:</strong> It’s simpler and more performant than version 1.0</li><li><strong>Monitor Job Status:</strong> Always check job completion and results</li><li><strong>Optimize Batch Sizes:</strong> 10,000 records per batch is usually optimal</li><li><strong>Handle Partial Failures:</strong> Some records might fail — plan for it</li></ul><h3>Streaming API Best Practices</h3><ul><li><strong>Design Events Carefully:</strong> Think about what data you really need in the event</li><li><strong>Handle Replay:</strong> Events can be replayed ,make your logic idempotent</li><li><strong>Monitor Event Volume:</strong> High-frequency events can impact performance</li><li><strong>Use Platform Events:</strong> They’re more reliable than generic streaming for custom scenarios</li></ul><pre>// Error handling example for REST API<br>public class SafeRestApiCall {<br>    <br>    public static String createAccountSafely(String accountName) {<br>        try {<br>            Http http = new Http();<br>            HttpRequest request = new HttpRequest();<br>            request.setEndpoint(&#39;callout:My_Named_Credential/services/data/v58.0/sobjects/Account&#39;);<br>            request.setMethod(&#39;POST&#39;);<br>            request.setHeader(&#39;Content-Type&#39;, &#39;application/json&#39;);<br>            <br>            Map&lt;String, Object&gt; accountData = new Map&lt;String, Object&gt;{<br>                &#39;Name&#39; =&gt; accountName<br>            };<br>            <br>            request.setBody(JSON.serialize(accountData));<br>            HttpResponse response = http.send(request);<br>            <br>            // Proper error handling<br>            if (response.getStatusCode() == 201) {<br>                Map&lt;String, Object&gt; result = (Map&lt;String, Object&gt;) JSON.deserializeUntyped(response.getBody());<br>                return (String) result.get(&#39;id&#39;);<br>            } else {<br>                System.debug(&#39;Error creating account: &#39; + response.getStatusCode() + <br>                            &#39; — &#39; + response.getBody());<br>                return null;<br>            }<br>        } catch (Exception e) {<br>            System.debug(&#39;Exception during API call: &#39; + e.getMessage());<br>            return null;<br>        }<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4AIDAMxnn-0VCrSO3KxfsA.png" /></figure><h3>Wrapping Up</h3><p>There you have it! The next time someone asks you “Which API should I use?”, you’ll know exactly what to tell them:</p><ul><li><strong>Small data, immediate response?</strong> → REST API</li><li><strong>Big data, batch processing?</strong> → Bulk API</li><li><strong>Real-time notifications?</strong> → Streaming API</li></ul><p>Remember, there’s no “one size fits all” solution. The best developers understand the trade-offs and pick the right tool for each specific job. Sometimes you’ll even use all three in the same project!</p><p>Keep this guide handy, bookmark it, share it with your team. Most importantly, start experimenting with the code examples above. Nothing beats hands-on experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c181a72f2eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced File Upload in Salesforce LWC: Handling Attachments/Files without RecordId]]></title>
            <link>https://medium.com/@abinayasiva88/advanced-file-upload-in-salesforce-lwc-handling-attachments-files-without-recordid-1950fbc798a0?source=rss-bc47b1b9b38d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1950fbc798a0</guid>
            <category><![CDATA[cloud-experience]]></category>
            <category><![CDATA[salesforce-contentversion]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[lwc]]></category>
            <category><![CDATA[file-upload-in-salesforce]]></category>
            <dc:creator><![CDATA[Abinaya Mettupatti Sivagnanam]]></dc:creator>
            <pubDate>Thu, 17 Jul 2025 00:31:13 GMT</pubDate>
            <atom:updated>2025-07-17T00:31:13.670Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UwJ5ioU8n3FsAL3VGgaV3w.png" /><figcaption>File upload in LWC</figcaption></figure><p>When working with Salesforce Lightning Web Components (LWC), the &lt;lightning-file-upload&gt; tag is often your go-to for handling file attachments. It’s simple, effective, and seamlessly integrates with your records. However, real-world use cases are rarely that straightforward.</p><p>What if you need to upload a file <strong>before the record exists</strong>?<br>What if the file is <strong>mandatory to create the record</strong> itself?<br>How do you <strong>track uploaded files</strong> when there’s <strong>no record ID</strong>?</p><p>This article explores advanced strategies to handle these edge cases using a powerful but lesser-known feature: <strong>file field name </strong>and <strong>file field value</strong>.</p><h3>The Basics: &lt;lightning-file-upload&gt;</h3><p>Salesforce’s &lt;lightning-file-upload&gt; lets users upload files and automatically associates them with a record via the recordId attribute. That’s fine when the record already exists.</p><pre>&lt;lightning-file-upload<br>    label=&quot;Upload File&quot;<br>    record-id={recordId}<br>    onuploadfinished={handleUploadFinished}&gt;<br>&lt;/lightning-file-upload&gt;</pre><p>But what happens when there’s <strong>no record ID yet</strong>?</p><h3>The Problem: Uploading Files Before Record Creation</h3><p>Consider a use case in a Community (Experience Cloud) where a file is a <strong>required input</strong> before submitting a case, form, or application. Since the record doesn’t exist yet, you don’t have a recordId to associate the file with.</p><p>You might ask:</p><ul><li>Can we upload the file without a recordId?</li><li>If yes, how do we <strong>track or retrieve</strong> those files later?</li><li>Can we <strong>tie uploaded files</strong> to specific parts of a form or application dynamically?</li></ul><h3>The Solution: fileFieldName and fileFieldValue</h3><p>Salesforce introduced two powerful properties for &lt;lightning-file-upload&gt;:</p><ul><li>file-field-name</li><li>file-field-value</li></ul><p>These properties allow you to <strong>tag uploaded files</strong> — even when there’s no associated record.</p><h3>Step 1: Create a Custom Field on ContentVersion</h3><p>Create a custom field on the ContentVersion object in Salesforce.<br> The field name must end with FileUpload__c, like:</p><ul><li>Form_Ref_FileUpload__c</li></ul><p>Let’s assume we create a field called Form_Reference_FileUpload__c.</p><h3>Step 2: Use fileFieldName and fileFieldValue in LWC</h3><p>Here’s how to set it up in LWC:</p><pre>&lt;lightning-file-upload<br>    label=&quot;Upload Required Document&quot;<br>    accept={acceptedFormats}<br>    file-field-name=&quot;Form_Reference_FileUpload__c&quot;<br>    file-field-value={formIdentifier}<br>    onuploadfinished={handleUploadFinished}&gt;<br>&lt;/lightning-file-upload&gt;</pre><p>In this setup:</p><ul><li>file-field-name tells Salesforce which custom field on ContentVersion to populate.</li><li>file-field-value provides a <strong>unique identifier</strong> for the file (can be a GUID, timestamp, or dynamic string).</li></ul><h3>Use Case: Mapping Files to Questions or Sections</h3><p>Say you’re building a form with multiple questions, each requiring a file upload. You can assign a dynamic value to file-field-value for each question—like a composite string ApplicationID_Question3.</p><p>This allows you to:</p><ul><li>Track which file belongs to which section or question</li><li>Retrieve them later via SOQL using a filter on the custom field</li></ul><h3>Pro Tip: Store Structured Metadata as JSON</h3><p>You can take it further by passing a <strong>JSON string</strong> as the file-field-value. This string could include:</p><ul><li>Application ID</li><li>Section/Question ID</li><li>Timestamp</li><li>User context</li></ul><p>Example:</p><pre>fileFieldValue = JSON.stringify({<br>  applicationId: &#39;APP123&#39;,<br>  questionId: &#39;Q5&#39;,<br>  uploadedBy: &#39;GuestUser&#39;,<br>  time: new Date().toISOString()<br>});</pre><p>Why this matters:</p><ul><li>You get <strong>rich metadata</strong> without creating multiple fields.</li><li>It’s easy to parse and process later.</li><li>You can run SOQL queries and deserialize the content for downstream use.</li></ul><h3>Retrieving the Uploaded Files</h3><p>Later in your flow, once the record is created, you can:</p><ul><li>Query ContentVersion where your custom field matches the dynamic value used.</li><li>Update the ContentDocumentLink to associate the file with the newly created record.</li><li>Maintain audit and traceability of user uploads.</li></ul><pre>SELECT Id, Title, Form_Reference_File_Upload__c<br>FROM ContentVersion<br>WHERE Form_Reference_File_Upload__c = &#39;APP123_Q5&#39;</pre><h3>Final Thoughts</h3><p>The file-field-name and file-field-value properties unlock a new level of flexibility in LWC file handling. Whether you’re working on Experience Cloud, guided forms, or advanced data collection flows, this approach lets you:</p><ul><li>Upload files <strong>before record creation</strong></li><li>Tag files with <strong>custom identifiers</strong></li><li>Associate them with records <strong>after submission</strong></li><li>Maintain a clean and scalable architecture</li></ul><p>Next time you need to handle complex file uploads in Salesforce LWC, think beyond recordId. With a little planning and creative use of metadata, you can build robust and user-friendly file workflows that scale.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1950fbc798a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>