<?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 Michele Milidoni on Medium]]></title>
        <description><![CDATA[Stories by Michele Milidoni on Medium]]></description>
        <link>https://medium.com/@michelemilidoni?source=rss-d9ecc16d2abf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uLXSSXavPS3qpse75fU9HQ.jpeg</url>
            <title>Stories by Michele Milidoni on Medium</title>
            <link>https://medium.com/@michelemilidoni?source=rss-d9ecc16d2abf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 06:21:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@michelemilidoni/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[From Developer Console to Web Console: Your Feature Migration Guide]]></title>
            <link>https://medium.com/salesforce-champion/from-developer-console-to-web-console-your-feature-migration-guide-bb87cbffc783?source=rss-d9ecc16d2abf------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb87cbffc783</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Michele Milidoni]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 07:29:43 GMT</pubDate>
            <atom:updated>2026-09-02T07:29:43.164Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h77QD3sYosFhC8e2PKHXfQ.jpeg" /></figure><p>Salesforce’s <strong>Web Console</strong> — the modern, browser-based IDE built on VS Code for Web — entered beta on <strong>April 14, 2026</strong> and is now rolling out across orgs, including all sandboxes. It’s positioned as the direct replacement for the aging <strong>Developer Console</strong> (and the long-unsupported Workbench).</p><p>If your muscle memory is wired for Developer Console tabs, this guide maps every common workflow to its Web Console equivalent.</p><h3>Table of Contents</h3><ul><li>At a glance</li><li>Key facts up front</li><li>The Web Console layout</li><li>Feature-by-feature migration map<br>– Open and edit Apex classes and triggers<br>– Execute anonymous Apex<br>– Run SOQL queries (the Query Editor replacement)<br>– Query Plan analysis<br>– Debug logs and trace flags<br>– Run Apex tests and check code coverage<br>– Lightning Web Components — finally supported<br>– Browse org metadata<br>– Search and replace across the codebase<br>- Gotchas to plan for</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCKZwnIioL-a1uzT5CAPcw.jpeg" /><figcaption>The Web Console window</figcaption></figure><h3>At a glance</h3><p><strong>Same capability, new location</strong></p><ul><li>Anonymous Apex</li><li>Query Plan analysis (now a dedicated button instead of buried in the Query Editor)</li><li>Apex tests and code coverage</li><li>Apex class and trigger editing</li><li>Visualforce and Aura components</li></ul><p><strong>Better in Web Console</strong></p><ul><li>SOQL: visual Query Builder plus CSV/JSON export of results</li><li>LWC: full support (Developer Console never supported it)</li><li>Metadata: all types via the Org Browser (Developer Console handled Apex, Aura, and Visualforce only)</li><li>Context-aware launch: opens directly from Apex Jobs, Apex Classes, and Apex Triggers Setup pages</li><li>Production guardrail: Apex is read-only in production orgs</li><li>Editor: VS Code-grade completion, go-to-definition, refactoring, and a real project context</li><li>Debug logs: pulled automatically every 30 seconds</li></ul><p><strong>Missing or rough in the beta</strong></p><ul><li>Log viewer: raw text only — Developer Console had structured log views and open-source-from-log</li><li>Checkpoint debugger: not available</li><li>No marketplace extensions</li></ul><h3>Key facts up front</h3><ul><li><strong>What it is:</strong> A lightweight IDE embedded directly in your org — no local install, no CLI auth, authenticated with your existing Salesforce session (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/what-is-web-console.html">Introduction to Web Console</a>)</li><li><strong>Who gets it:</strong> Free, in all supported editions (Developer, Enterprise, Unlimited, Performance, Professional, and Partner). Apex is <strong>read-only in production orgs</strong>; sandboxes and non-production orgs get full editing — which is where you’ll do most of your work</li><li><strong>Coexistence:</strong> When Web Console is active, Developer Console is inactive <em>by default</em>. Admins can re-enable both from the same Setup page during transition (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/enable-ide.html">Enable Web Console</a>)</li></ul><h3>The Web Console layout</h3><p>If you know VS Code, you already know Web Console. Five main areas:</p><ol><li><strong>Activity Bar</strong> — Explorer, Search, Run and Debug, and the Org Browser</li><li><strong>Sidebar</strong> — the active view (file tree in DX project structure)</li><li><strong>Editors</strong> — split editors, side by side, vertically or horizontally</li><li><strong>Output Panel</strong> — output and debug info in tabs</li><li><strong>Status Bar</strong> — project info, org alias, and tracing status</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*58R-jA9lha4bbvweYpXwxw.jpeg" /><figcaption>The five main areas of the Web Console UI</figcaption></figure><h3>Feature-by-feature migration map</h3><h3>1. Open and edit Apex classes and triggers</h3><ul><li><strong>Developer Console:</strong> File → Open Resource (Ctrl+Shift+O), double-click a class from the Classes list. No project context — each file opened in isolation.</li><li><strong>Web Console:</strong> Click <strong>Edit</strong> next to any Apex class, trigger, or job in Setup, and it opens in the editor. Web Console maintains a real <strong>DX project context</strong> (force-app/main/default structure with sfdx-project.json), so files open in-context alongside related code. Create new components with <strong>SFDX: Create Apex Class</strong> / <strong>SFDX: Create Apex Trigger</strong> from the Command Palette (Ctrl/Cmd+Shift+P).</li></ul><p>Bonus: you get VS Code-grade editing — syntax error detection, code completion, go-to-definition, class outlines, snippets, and refactoring — none of which Developer Console ever had.</p><h3>2. Execute anonymous Apex</h3><ul><li><strong>Developer Console:</strong> Debug → Open Execute Anonymous Window (Ctrl+E), paste code, Execute.</li><li><strong>Web Console:</strong> Create a script with <strong>SFDX: Create Anonymous Apex Script</strong> (saved under scripts/), then click <strong>Execute</strong> above the editor — or right-click and choose <strong>SFDX: Execute Anonymous Apex with Currently Open Editor</strong>. To run only part of a script, highlight the code and use <strong>Execute Anonymous Apex with Editor&#39;s Selected Text</strong>. Output appears in the Debug Console; click <strong>Open Log</strong> to jump into the log viewer. (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/webconsole-apex-anonymous.html">Use Anonymous Apex</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DNO4XbFAyrCzG9IwnaCyfQ.jpeg" /><figcaption>Execute button above an anonymous Apex script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sjuOwcGUN-hH5b4wIMOo0Q.jpeg" /><figcaption>Debug log generated after running anonymous Apex</figcaption></figure><h3>3. Run SOQL queries (the Query Editor replacement)</h3><p><strong>Developer Console:</strong> Query Editor tab, type SOQL/SOSL, Execute.</p><p><strong>Web Console:</strong> Two options, both better:</p><ul><li><strong>SOQL Query Builder</strong> (SFDX: Create Query in SOQL Builder): a visual form for object, fields, WHERE, ORDER BY, and LIMIT — it writes the query for you. Great for admins and anyone who doesn&#39;t live in SOQL.</li><li><strong>Text editor:</strong> open or paste a query and click <strong>Run Query</strong> above it. Choose <strong>REST API</strong> for record data or <strong>Tooling API</strong> for metadata/development-lifecycle queries (test results, debug logs, etc. — effectively replacing Developer Console’s Tooling API query trick).</li></ul><p>Results render in a grid and can be saved as <strong>CSV or JSON</strong> (stored under .sfdx/data). Queries persist as .soql files in scripts/soql. (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/query-records.html">Query Records</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ob22RZzj7XINytIPM2AiAQ.png" /><figcaption>The SOQL Query Builder building an Account query visually</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TPh4cz6hWAI3yqurFNzuCQ.png" /><figcaption>Query results displayed in the SOQL Builder results grid</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppOQGSHj38LdsupPmjuFXQ.jpeg" /><figcaption>Run Query from the text editor, with REST API / Tooling API options</figcaption></figure><h3>4. Query Plan analysis</h3><ul><li><strong>Developer Console:</strong> Query Plan tool, somewhat buried in the Query Editor.</li><li><strong>Web Console:</strong> Open the query in the SOQL Builder or text editor and click <strong>Get Query Plan</strong>. The plan, operation costs, and optimization notes appear in the Output panel — a dedicated, more discoverable workflow for tuning queries on large data volumes. (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/retrieve-query-plans.html">Retrieve Query Plans</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*usPkq_GAHYzV_ORzQOu3IA.jpeg" /><figcaption>Query plan results inside the SOQL Query Builder</figcaption></figure><h3>5. Debug logs and trace flags</h3><ul><li><strong>Developer Console:</strong> Setup trace flags via the Logs tab; view logs in the stacked/raw log viewer with execution log filters.</li><li><strong>Web Console:</strong> Hover the <strong>No Tracing</strong> label in the status bar and select <strong>Create trace flags for the current user</strong> (or add traces for other users). Log levels are managed in a traceLogs.json file — click <strong>Create Debug level</strong> to define them. Logs are pulled automatically <strong>every 30 seconds</strong> (configurable in Settings), land under sfdx/tools/debug/logs, and open in the Debug Log Viewer. The status bar shows tracing state (&quot;Tracing until END-TIME&quot;). (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/add-trace-flags.html">Add Trace Flags and Log Levels</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5xu6Mzkij6DY669Ez2Nvtw.jpeg" /><figcaption>Hover the No Tracing label on the status bar to create trace flags</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8NRrI9iiYGy1Bs-mMRuXg.png" /><figcaption>Log levels configured in the traceLogs.json file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFx228vLm_nttej6LqxbQg.jpeg" /><figcaption>Logs automatically pulled into the console with trace details</figcaption></figure><blockquote><em>⚠️ Honest caveat: per Salesforce’s own </em><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/dev-vs-web.html"><em>Developer Console vs. Web Console comparison</em></a><em>, Developer Console’s log viewer offered an enhanced log-viewing experience with multiple views and the ability to open source code directly from a log line. Web Console currently </em><strong><em>displays logs as raw text</em></strong><em> without visualization tooling. If you relied heavily on Developer Console’s structured log perspectives, expect some regression here while the beta matures.</em></blockquote><h3>6. Run Apex tests and check code coverage</h3><ul><li><strong>Developer Console:</strong> Tests tab, select class, Run All/Run Selected, coverage view.</li><li><strong>Web Console:</strong> Open the <strong>Apex Tests</strong> view (beaker icon in the Activity Bar). Run a single method, one class, or all tests via the play icons, or use the <strong>Run Test</strong> / <strong>Run All Tests</strong> code lenses directly above test methods in the editor. Results land in the Output panel; <strong>Ctrl/Cmd+click a stack trace jumps to the failing line</strong>, and clicking a failed test navigates to the failure point. Enable coverage in workspace settings (retrieve-test-code-coverage) and toggle per-class coverage highlighting via the three-bars icon next to your org alias. (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/webconsole-apex-tests.html">Test Apex Code</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*mz09V8eMBS9MvQrrKN5vrQ.jpeg" /><figcaption>Code coverage percentages per class in the test output panel</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*iHYty_MQFpnkEyeUCCNPhA.jpeg" /><figcaption>Toggling visual code coverage highlighting from the status bar</figcaption></figure><h3>7. Lightning Web Components</h3><ul><li><strong>Developer Console:</strong> Never supported LWC. At all.</li><li><strong>Web Console:</strong> Enhanced language support for LWC — view and edit component JS, HTML, and CSS, with JS/HTML snippets included. (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/dev-vs-web.html">Developer Console vs Web Console</a>)</li></ul><h3>8. Browse org metadata</h3><ul><li><strong>Developer Console:</strong> Limited to Apex, Aura, and Visualforce metadata.</li><li><strong>Web Console:</strong> The <strong>Org Browser</strong> (cloud icon in the Activity Bar) lists <em>all</em> metadata types in the org. Filter with patterns (Apex*), expand a type, and click the retrieve icon to pull a single component or an entire type into your project — complete with its -meta.xml. (<a href="https://developer.salesforce.com/docs/platform/webconsole/guide/org-browser.html">Org Browser</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*xe-1FyeF-uVQx0PHMAg1gg.jpeg" /><figcaption>The Org Browser listing org metadata types</figcaption></figure><h3>9. Search and replace across the codebase</h3><ul><li><strong>Developer Console:</strong> Search was limited to the currently open file or basic resource lookup.</li><li><strong>Web Console:</strong> The Search view gives you full project-wide find-and-replace, VS Code style.</li></ul><h3>Gotchas to plan for</h3><ol><li><strong>Permissions are real work here.</strong> Beyond enabling the console, users need <strong>Web Console User</strong>, <strong>View All Data</strong>, and <strong>Use Any API Client</strong> (the last one hides if API Access Control is off in your org). Bake these into your sandbox permission sets.</li><li><strong>Production is read-only by design.</strong> You can inspect production code but not edit it — a safety improvement over Developer Console, but a workflow change for teams that hot-fixed directly in production.</li><li><strong>No terminal, no marketplace.</strong> The extensions are prepackaged; you can’t install from the VS Code Marketplace, and there’s no CLI. For heavy lifting — Git integration, scratch orgs, large deployments — you still want local VS Code or Agentforce Vibes IDE.</li><li><strong>Checkpoints aren’t available (yet).</strong> Developer Console’s checkpoint debugger has no Web Console equivalent in the beta. Use trace flags with granular log levels instead; the project ships preconfigured .vscode/launch.json for the Apex Replay Debugger.</li><li><strong>It’s still Beta.</strong> File issues via the <a href="https://github.com/forcedotcom/web-console-feedback">web-console-feedback repo</a>.</li></ol><p><strong>Sources:</strong></p><ul><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/what-is-web-console.html">What Is Web Console — Salesforce Docs</a></li><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/dev-vs-web.html">Developer Console Vs Web Console — Salesforce Docs</a></li><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/enable-ide.html">Enable / Launch Web Console — Salesforce Docs</a></li><li><a href="https://developer.salesforce.com/docs/platform/webconsole/guide/faq.html">Web Console FAQ — Salesforce Docs</a></li><li><a href="https://developer.salesforce.com/blogs/2026/04/introducing-web-console-beta-code-where-you-build-on-salesforce">Introducing Web Console (Beta): Code Where You Build on Salesforce</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb87cbffc783" width="1" height="1" alt=""><hr><p><a href="https://medium.com/salesforce-champion/from-developer-console-to-web-console-your-feature-migration-guide-bb87cbffc783">From Developer Console to Web Console: Your Feature Migration Guide</a> was originally published in <a href="https://medium.com/salesforce-champion">Salesforce Champion</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring Salesforce for Company Email Deliverability]]></title>
            <link>https://medium.com/salesforce-champion/configuring-salesforce-for-company-email-deliverability-3072888a9a21?source=rss-d9ecc16d2abf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3072888a9a21</guid>
            <category><![CDATA[email]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[deliverability]]></category>
            <dc:creator><![CDATA[Michele Milidoni]]></dc:creator>
            <pubDate>Fri, 29 Nov 2024 04:08:37 GMT</pubDate>
            <atom:updated>2024-11-29T04:08:37.014Z</atom:updated>
            <content:encoded><![CDATA[<p>Sending emails from a company email address in Salesforce offers several advantages over using personal email addresses. Firstly, it establishes <strong>trust and legitimacy</strong> with recipients, reducing the risk of your emails being marked as spam or phishing attempts. Secondly, company email addresses reinforce <strong>brand recognition</strong> and <strong>professionalism</strong>. Finally, they allow for proper reply-to functionality and easier tracking of email communication.</p><p>Furthermore, some mail servers such as Gmail mark as spam the emails sent from Salesforce.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*b3n-Xg5iLOgnJG4WN0y-jw.png" /></figure><p>This guide will walk you through the steps of configuring Salesforce to use your company email address as the default sender and setting up SPF and DKIM for improved email deliverability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s-IW-tPID9JLu0PNc6o93g.png" /></figure><h3>Prerequisites</h3><ul><li>Salesforce admin permissions;</li><li>a company email address to be used as sender (i.e. <em>noreply@milidoni.it</em>), and access to the mailbox;</li><li>admin access to DNS records of the mail domain (i.e. <em>milidoni.it</em>).</li></ul><h3>Salesforce Deliverability</h3><p>Environment: <strong>Salesforce</strong></p><p>Setup → Deliverability</p><ol><li>Turn OFF “Enable compliance with standard email security mechanisms ”</li><li>Turn OFF “Enable Sender ID compliance”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OvpU99fxX5dQnHVDUBgKiw.png" /></figure><p>Ref: <a href="https://help.salesforce.com/s/articleView?id=000382640&amp;type=1">Help And Training Community</a></p><h3>DNS Configuration</h3><h4>SPF record</h4><p>Environment: <strong>DNS admin panel</strong></p><p><strong>In a nutshell</strong></p><p>Add the following to the existing spf1 record:<br>include:_spf.salesforce.com</p><p>If the sfp1 record doesn’t exist, create it as new TXT record:<br>v=spf1 include:_spf.salesforce.com ~all</p><p><strong>More details</strong></p><ul><li>From the control panel for your domain DNS host, look for the line with v=spf. If it is there, you already have other domains sending on your behalf. It may look something likev=spf1 include:example.com ~all</li></ul><p>Add the following to the existing record:<strong>include:_spf.salesforce.com</strong></p><p>And it then becomes:</p><p>v=spf1 include:example.com<strong> include:_spf.salesforce.com</strong> ~all</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZF3Oz1I8zJIZUBOfHcyPg.png" /></figure><p>Ref: <a href="https://www.salesforceben.com/salesforce-email-deliverability/">Salesforce Email Deliverability Tips: BCC Email, SPF, DKIM, DMARC</a></p><h3>DKIM records</h3><h4>Step 1 — generate DKIM key in Salesforce</h4><p>Environment: <strong>Salesforce</strong></p><p>Setup → DKIM Keys → Create a new DKIM Key</p><ul><li>Key Size: ⁠2028-bit</li><li>Selector: sf1</li><li>Alternate Selector: sf2</li><li>Domain: company <em>email address’s domain </em>(if sender email address is <a href="/service/mailto:noreply@milidoni.it"><em>noreply@milidoni.it</em></a>, the value will be <a href="https://milidoni.it/"><em>milidoni.it</em></a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*F_P0cF6Fll9IVlEUj3tEEQ.png" /><figcaption>Creating a new DKIM Key</figcaption></figure><ul><li>From the confirmation page, copy CNAME and Alternate CNAME records, they will be used in the following section.</li></ul><h4>Step 2 — add DKIM Key records in company’s DNS</h4><p>Environment: <strong>DNS admin panel</strong></p><ul><li>Add the CNAME records generated from the previous step.<br>Remember to replace the following with the value generated from the previous step.</li></ul><pre>sf1._domainkey.milidoni.it IN CNAME sf1.ldiilh.custdkim.salesforce.com.<br>sf2._domainkey.milidoni.it IN CNAME sf2.0tw5wu.custdkim.salesforce.com.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sg60-MylUPPrONFjaASk9g.png" /><figcaption>CNAME records added to the DNS</figcaption></figure><h4>Step 3 — activate DKIM records in Salesforce</h4><p>Environment: <strong>Salesforce</strong></p><p>After 24 hours, the DNS records are propagated.</p><ul><li>Setup → DKIM Keys. Click on sf1 hyperlink</li><li>Press “Activate”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*Z3EdnwojaFTKJPq7uIgMUQ.png" /><figcaption>List of the DKIM keys</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*6jE5V-AynHTB7DT6zpmgWA.png" /><figcaption>Activating the DKIM key</figcaption></figure><h4>Step 4 — adding the company email address to Salesforce</h4><p>Environment: <strong>Salesforce</strong></p><p>Setup → Organization-Wide Addresses → Add</p><ul><li>Display Name: sender name (i.e. No Reply)</li><li>Email Address: sender email address (i.e. noreply@milidoni.it)</li><li>Purpose: select “User Selection and Default No-Reply Address”</li></ul><p>Save</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*3tOPYZKw9y_0Mwn3hpWNsg.png" /></figure><ul><li>Salesforce will send a validation email to the mailbox: login to your company email mailbox and click the validation link.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*E2LLEsrR1_5o7h5Ne6mNtw.png" /></figure><ul><li>Setup → Process Automation Settings</li></ul><p>Set the client’s email address as Automated Process User Email Address and Email Approval Sender.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*aUzOF9qYiEAvbbscB88Qxw.png" /></figure><h3>Testing</h3><p>You can test the quality of your email by sending a test email to a Gmail account.</p><ol><li>Copy the APEX code below, replace the string recipient_email_address on the line 1 with the email address that will receive the test email.</li><li>Execute the code from Developer Console:</li></ol><pre>String recipient = &#39;recipient_email_address&#39;;<br><br>List&lt;OrgWideEmailAddress&gt; owea = [SELECT Id, Address, DisplayName FROM <br>OrgWideEmailAddress WHERE IsVerified=true LIMIT 1];<br>Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();<br>String[] sendingTo = new String[]{recipient};<br>mail.setToAddresses(sendingTo);<br>mail.setSubject(&#39;Single Email message Example&#39;);<br>mail.setPlainTextBody(&#39;Hello! This is a test email to test single email message program&#39;);<br>if ( owea.size()&gt;0) {<br>    System.debug(owea);<br> mail.setOrgWideEmailAddressId(owea[0].Id);<br>}<br>Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});</pre><p>The email is now perfectly delivered to the Gmail account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*Tj_fBDobqXPRzMzcXvKdYQ.png" /></figure><p>You can also test the quality of your email using online tools that analyse your emails, such as Mail Tester.</p><ol><li>Go to <a href="https://www.mail-tester.com/">https://www.mail-tester.com/</a> . The email address that appears in the home page is the address that will receive the email.</li><li>Copy the email address that appears in the home page and paste it as recipient on line 1 of the APEX code above.</li><li>Execute the code from Developer Console.</li><li>Click the button Then check your score on Mail Tester webpage and verify the result.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9TowWSdKrtzjvURvkNBKAA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3072888a9a21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/salesforce-champion/configuring-salesforce-for-company-email-deliverability-3072888a9a21">Configuring Salesforce for Company Email Deliverability</a> was originally published in <a href="https://medium.com/salesforce-champion">Salesforce Champion</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Programmatic sharing using Flow]]></title>
            <link>https://medium.com/salesforce-champion/programmatic-sharing-using-flow-90ca959a4c71?source=rss-d9ecc16d2abf------2</link>
            <guid isPermaLink="false">https://medium.com/p/90ca959a4c71</guid>
            <category><![CDATA[flow]]></category>
            <category><![CDATA[salesforce-sharing]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Michele Milidoni]]></dc:creator>
            <pubDate>Sat, 27 Aug 2022 18:26:42 GMT</pubDate>
            <atom:updated>2022-08-28T18:40:36.639Z</atom:updated>
            <content:encoded><![CDATA[<p>An essential guide for Salesforce developers on how to share records using Flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHueuXpLy8ec6h0TPO98vQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Winkler</a> on <a href="https://unsplash.com/s/photos/sharing?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Summary</h3><ul><li>Introduction</li><li>Use Case</li><li>Solution</li><li>Implementation</li><li>A ready-to-use Package</li></ul><h3>Introduction</h3><p>There are different ways to share records in Salesforce.</p><ul><li><em>Org-Wide Defaults (aka OWD)</em> — records can be shared with the owner only (private), with everyone in read-only mode (Public Read Only), or with everyone in read and write mode (Public Read Write)</li><li><em>Role Hierarchy, Territory Hierarchy</em> — if Grant Access Using Hierarchies is ticked in <em>OWD</em>, records are shared with all users above owner’s role/territory hierarchy</li><li><em>Sharing Rules</em> — based on rule criteria, records are shared with users that are part of a specific role, territory, public group</li><li><em>Manual Sharing</em> — records can be manually shared with single users, users that are part of a role, territory or public group</li></ul><p>However, some scenarios cannot be covered by any of the features above. For example, when the logic that defines the sharing criteria is complex and users of which records must be shared with are not part of the same hierarchy.</p><h3>Use case: training new employees</h3><blockquote><em>UniMatrix</em> provides machinery and equipment maintenance services. A trainer is assigned to new technicians during their first week. All training sessions are logged into a Salesforce object called <em>Training Report</em> but, for compliance reasons, only Trainer and Employee should automatically get access to the training records they are part of.</blockquote><h3>Implementation</h3><p><strong>Prerequisites</strong>: creating the object and setting the default access.</p><ul><li><strong>Training Report</strong> custom object and fields</li><li>Org-Wide Defaults for <strong>Training Report</strong> as Private</li><li>Grant Access Using Hierarchies for <strong>Training Report</strong> as false</li></ul><p><strong>Apex Sharing Reason</strong></p><blockquote>Note: when the owner of a record changes, Salesforce removes all sharing records with <em>Manual</em>as <em>RowCause</em>. As we want to keep sharing records with the related employees even though the owner changes, a new sharing reason is needed.</blockquote><p>(only available in Classic)<br>Setup → Objects → <strong>Training Report</strong>→ Apex Sharing Reasons → New</p><p>Reason Label: Employee<br>Reason Name: Employee</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*DaMbSQpGvYuRYkumGf0hog.png" /><figcaption>New Apex Sharing Reason</figcaption></figure><p><strong>Description of the Flow</strong></p><ul><li>The flow will run if the Training Report record is new, or if the employee changed</li><li>If the record already exists, the flow will delete the existing Training Report Share, as it is related to the previous employee</li><li>Finally, the flow will create a new Training Report Share, in order to share the record with the employee</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*ARVwS312SkH2Tj2WDabymA.png" /><figcaption>Flow overview</figcaption></figure><p><strong>Creating a new Flow</strong></p><p>Setup → Flows → New Flow</p><p>Chose Record-Triggered Flow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MRWLZ9zkxqbRo8mhiqX1Q.png" /></figure><p>Object: Training Report</p><p>When: <em>A record is created or edited</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*OCVt1tc7MiSVio_dhi3jTw.png" /></figure><p>Condition requirements: <em>Formula evaluates to true</em></p><p>Formula:</p><pre>OR(ISNEW(), {!$Record__Prior.Employee__c} != {!$Record.Employee__c})</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRGSXcjIPpxpfugzQM56Mg.png" /></figure><p>Done</p><p><strong>Verify if the record is new</strong></p><p>Add Element → New Decision</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*4a-LafEsIRjih5NyzEUVlA.png" /></figure><p>Label: Is a new record</p><p>Outcome Details: <em>as per the following image</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jKmMY46CnFmvSl__R9lesA.png" /></figure><p>Done</p><p><strong>If the record already exists, delete the share record with the previous employee</strong></p><p><em>Decision </em><strong><em>NO → </em></strong>Add Element → Delete Records</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*f6UHoSGM2IhgfCWbpJmbrA.png" /></figure><p>Label: Delete Share Record Old Employee</p><p>How To Find Records to Delete: Specify conditions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*E2bQofiEUM7dEzavTZlt-g.png" /></figure><p>Object: Share: Training Report</p><p>Condition Requirements: <em>as per the following image</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*ixTbmE5L9dZ6qQy2ESueRw.png" /></figure><p><strong>Finally, share the record with the Employee</strong></p><p><em>Outside Decision element </em>→ Add Element → Create Records</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*O7NgnXPfdI_VfAdTQ7Ofhg.png" /></figure><p>Label: Share Record with Employee</p><p>How to Set the Record Fields: Use separate resources, and literal values</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*RheWeuUPoINBKrYrIiVL_Q.png" /></figure><p>Object: Share: Training Report</p><p>Set Field Values: <em>as per the following image:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*zMH7wslmTTV6uaNgB1Azng.png" /></figure><p>Done</p><p><strong>Final Steps</strong></p><p>Save As: <em>give any name to your new Flow</em></p><p><strong>Activate</strong> the flow</p><h3>A ready-to-use Package</h3><p>The full solution is already available through a free package. It contains all components: object, fields, permission set, flow.</p><p>Please follow the instructions below to install the package:</p><ul><li><a href="https://trailhead.salesforce.com/users/profiles/orgs">Create a new Playground</a> in your Trailhead orgs</li><li>Install the package: <a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7R000000j9On">https://</a><a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7R000000j9On"><em>login.salesforce.com</em></a><a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7R000000j9On">/packaging/installPackage.apexp?p0=04t7R000001dYZu</a><br>Note: you might need to replace login.salesforce.com with your Playground domain name</li><li>Create two users (Trainer and Employee) and assign them Training Report Permission Set</li><li>Login as the Trainer and create a new Training Report record with the other user as Employee</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*gVZxtPEjHjKl83H4TB8NQA.png" /></figure><ul><li>Verify that the employee has read-only permission to see the record by logging in as the employee user or by extracting data from Training_Report__Share table:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*wyUyjG2ut7dlWXEbtOGCnQ.png" /></figure><p>If you want to see an advanced approach to share records in Salesforce, please visit <a href="https://michelemilidoni.medium.com/programmatic-sharing-using-apex-bbb6102449bb">Programmatic Sharing using Apex</a> .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90ca959a4c71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/salesforce-champion/programmatic-sharing-using-flow-90ca959a4c71">Programmatic sharing using Flow</a> was originally published in <a href="https://medium.com/salesforce-champion">Salesforce Champion</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Programmatic sharing using Apex]]></title>
            <link>https://michelemilidoni.medium.com/programmatic-sharing-using-apex-bbb6102449bb?source=rss-d9ecc16d2abf------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbb6102449bb</guid>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Michele Milidoni]]></dc:creator>
            <pubDate>Sun, 21 Aug 2022 13:59:19 GMT</pubDate>
            <atom:updated>2022-08-27T18:29:05.693Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Programmatic Sharing using Apex</h3><p>An essential guide for Salesforce developers on how to share records using Apex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHueuXpLy8ec6h0TPO98vQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Winkler</a> on <a href="https://unsplash.com/s/photos/sharing?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Summary</h3><ul><li>Introduction</li><li>Use Case — the business requirement</li><li>Implementation overview — observations and code snippets</li><li>Solution details</li><li>A ready-to-use Package</li><li>Resources</li></ul><h3>Introduction</h3><p>Various features allow users to get access to records in Salesforce:</p><ul><li>Org-Wide Defaults</li><li>Role Hierarchy</li><li>Sharing Rules</li><li>Manual Sharing</li><li>Team Access</li><li>Territory Hierarchy</li></ul><p>Although those features cover the most common scenarios, there are a few cases where a more granular control is required. By a real use case, this article illustrates how to share records through Apex.</p><p>The solution uses <em>Domain Layer</em> Apex enterprise pattern for educational purposes. To know more about it, please visit the Trailhead module <a href="https://trailhead.salesforce.com/content/learn/modules/apex_patterns_dsl">Apex Enterprise Patterns: Domain &amp; Selector Layers</a> .</p><h3>Use case: training new employees</h3><blockquote><em>UniMatrix</em> provides machinery and equipment maintenance services. A trainer is assigned to new technicians during their first week. All training sessions are logged into a Salesforce object called Training Report but, for compliance reasons, only Trainer and Employee should automatically get access to the training records they are part of.</blockquote><h3><strong>Implementation Overview</strong></h3><p><strong>Observations</strong></p><p>The most common Salesforce features do not meet the requirements:</p><ul><li><em>Org-Wide Defaults</em> — records can be accessible by the owner only, by everyone in read-only mode, by everyone in read and write mode</li><li><em>Team Access, Role Hierarchy, Territory Hierarchy</em> — Trainer and Employee might not be part of the same team, nor of the same role/territory hierarchy</li><li><em>Sharing Rules</em> — records cannot be dynamically shared with single users</li><li><em>Manual Sharing</em> — it requires a manual action by the record owner</li></ul><p>Apex programmatic sharing is the optimal way to meet the requirements.</p><p><strong>Prerequisites</strong>: configuring the object and setting the default access.</p><ul><li><strong>Training Report</strong> custom object and fields</li><li>Org-Wide Defaults for <strong>Training Report</strong> as Private</li><li>Grant Access Using Hierarchies for <strong>Training Report</strong> as false</li></ul><p><strong>Apex Sharing Reason</strong></p><blockquote>Note: when the owner of a record changes, Salesforce removes all sharing records with Manualas <em>RowCause</em>. As we want to keep sharing records with the related employees even though the owner changes, a new sharing reason is needed.</blockquote><p>(only available in Classic)<br>Setup → Objects → <strong>Training Report</strong>→ Apex Sharing Reasons → New</p><p>Reason Label: Employee<br>Reason Name: Employee</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*DaMbSQpGvYuRYkumGf0hog.png" /><figcaption>New Apex Sharing Reason</figcaption></figure><p><strong>Apex code snippets</strong></p><blockquote>Salesforce keeps track of the record sharing onto tables named <em>&lt;StandardObjectName&gt;Share </em>or <em>&lt;CustomObjectName&gt;__Share </em>for any object with OWD as Private or Public Read Only. <strong><br></strong>The code below uses <em>TrainingReport__Share </em>table in order to share Training Report records with the related employee.</blockquote><p>When a new Training Report record is created, the Apex code creates a new record into TrainingReport__Share table with:</p><ul><li>ParentId: current Training Report record Id</li><li>UserOrGroupId: Employee Id</li><li>RowCause: Schema.Training_Report__Share.rowCause.Employee__c (the Apex Sharing Reason created in the previous step)</li><li>AccessLevel: Read</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e539c0408e2612b566821e16865fa67/href">https://medium.com/media/5e539c0408e2612b566821e16865fa67/href</a></iframe><p>When a record is updated and Employee has changed, the Apex code must delete the previous sharing records first:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80bdef5e5856ca0b93924970194813c2/href">https://medium.com/media/80bdef5e5856ca0b93924970194813c2/href</a></iframe><h3>Solution details</h3><p>The implementation of the sharing logic uses the enterprise pattern <a href="https://trailhead.salesforce.com/content/learn/modules/apex_patterns_dsl/apex_patterns_dsl_learn_dl_principles">Domain Layer</a> by <a href="https://github.com/apex-enterprise-patterns/fflib-apex-common">fflib-apex-common</a> external libraries. This ensures code encapsulation and reuse within the application. In fact, the same logic is going to be implemented in both <em>trigger</em>, to automatically share records, and <em>Apex Sharing Recalculation Batch</em>, to retrofit the existing data.</p><p>TrainingReports Apex class extends fflib_SObjectDomain class to implement the Domain Apex pattern. The sharing logic is implemented in it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c3ce8f4d4849791edec87cc38a7cb15/href">https://medium.com/media/1c3ce8f4d4849791edec87cc38a7cb15/href</a></iframe><p>The following Apex Batch uses TrainingReports to recalculate the sharing of all existing records.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e7c8ea87ba1371d35d2a99653a601a7/href">https://medium.com/media/8e7c8ea87ba1371d35d2a99653a601a7/href</a></iframe><p>It is added into Apex Sharing Recalculation related list of the Training Report object:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*oTyyuMi0904SEH9N-NeEvQ.png" /></figure><p>The trigger is logic-less and it references to the Domain Layer TrainingReports</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4beb4baf0b59749eecac323863d21bce/href">https://medium.com/media/4beb4baf0b59749eecac323863d21bce/href</a></iframe><h3>A ready-to-use Package</h3><p>The full solution is already available through a free package. It contains all components: object, fields, permission set, Apex classes, trigger.</p><p>Please follow the instructions below to install the package:</p><ul><li><a href="https://trailhead.salesforce.com/users/profiles/orgs">Create a new Playground</a> in your Trailhead orgs</li><li>Install the package: <a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7R000000j9On">https://</a><a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7R000000j9On"><em>login.salesforce.com</em></a><a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7R000000j9On">/packaging/installPackage.apexp?p0=04t7R000000j9On</a><br>Note: you might need to replace login.salesforce.com with your Playground domain name</li><li>Create two users (Trainer and Employee) and assign them Training Report Permission Set</li><li>Login as the Trainer and create a new Training Report record with the other user as Employee</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*euU4wi21k4fngiRj9WDHXA.png" /></figure><ul><li>Verify that the employee has read-only permission to see the record by logging in as the employee user or by extracting data from Training_Report__Share table:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*qC8DqXDLsMw3gTlqrNBGrQ.png" /></figure><p>If you want to see a simplified approach to share records in Salesforce, please visit <a href="https://michelemilidoni.medium.com/programmatic-sharing-using-flow-90ca959a4c71">Programmatic sharing using Flow</a> .</p><h3>Resources</h3><ul><li><a href="https://github.com/mmilidoni/sfdc-training-report-employee-sharing">GitHub - mmilidoni/sfdc-training-report-employee-sharing</a></li><li><a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm">Sharing a Record Using Apex</a></li><li><a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_recalc.htm">Recalculating Apex Managed Sharing</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbb6102449bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>