<?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 Sergey Trusov on Medium]]></title>
        <description><![CDATA[Stories by Sergey Trusov on Medium]]></description>
        <link>https://medium.com/@strusov?source=rss-f3355e9461a3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lz1TWPDnh1-etzg7ZOpJ_w.jpeg</url>
            <title>Stories by Sergey Trusov on Medium</title>
            <link>https://medium.com/@strusov?source=rss-f3355e9461a3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 15:09:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@strusov/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[Free Salesforce Certification]]></title>
            <link>https://medium.com/@strusov/free-salesforce-certification-f51882d088d2?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f51882d088d2</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce-admin]]></category>
            <category><![CDATA[salesforce-developer]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Wed, 17 Jun 2020 14:30:26 GMT</pubDate>
            <atom:updated>2020-06-17T14:30:26.962Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*vWr-QYFQsyFS5chi.png" /></figure><p>We all know how important it is to improve your skills. If now you have more free time — it becomes more relevant.</p><p>Salesforce really knows how to train and offers us some free ways to grow. We gathered them together, it remains only to use what suits you!</p><h3>Level Up Challenge (Free for your first Certification)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/0*asEKTfyALwzkey00.png" /></figure><p>Get ready to earn your first Salesforce certificate. If you have chosen a career as an administrator or developer, sign up for the Level Up Challenge. Complete your Super Set and get a voucher to sit for a Salesforce certification exam ($ 200 value).</p><blockquote><em>Check out full article in our company blog post — </em><a href="https://blog.truesalessoft.com/free-salesforce-certification/">https://blog.truesalessoft.com/free-salesforce-certification</a></blockquote><h3>Trailhead Quests — your next step</h3><p>It is a chance to win prizes exploring new skills, earn badges, rank up, and achieve your goals in Trailhead. Sometimes you need a little dash of motivation to help you power through your ambitious learning goals. With <a href="https://trailhead.salesforce.com/quests?&amp;utm_source=trailhead&amp;utm_medium=blog-the-trailblazer&amp;utm_campaign=trailblazer_blog&amp;utm_content=blog-moar-quests">Trailhead Quests</a> you can keep your continuous learning momentum going.</p><p>And here is how to get their prizes:</p><p>Find <a href="https://trailhead.salesforce.com/quests?&amp;utm_source=trailhead&amp;utm_medium=blog-the-trailblazer&amp;utm_campaign=trailblazer_blog&amp;utm_content=blog-moar-quests">Quests</a> in Community in the menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/0*JuBhZwg3Ci7owkLn.png" /></figure><p>And then follow the advice:</p><p>Choose a Quest (and look prize!)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CFRZAJml5OF8PafZ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VETH0hWhuhYB2A2t.png" /></figure><p>Complete the Challenge and wait your Win letter.</p><p>Easy-peasy!</p><h3>And… Amaze $100USD discount from Salesforce Certification Days!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/0*QIMQjtvsPCNMusGO.png" /></figure><p>Salesforce invites everyone to join a free one-day virtual session designed to help you prepare for the Salesforce Certification Exam.<br>The coupon code for a $100USD discount off ANY $200 exam available to anyone who visits the free <a href="https://pub.s7.exacttarget.com/ryqkengawga">Salesforce Certification Days</a> webinars.</p><p>If you already have certificates but the help of professionals willows will need — <a href="https://truesalessoft.com/contact.html"><strong>write to us!</strong></a> We are always happy to help in the implementation of complex tasks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f51882d088d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fix ‘Bad value for restricted picklist field’ error]]></title>
            <link>https://medium.com/@strusov/how-to-fix-bad-value-for-restricted-picklist-field-error-141128fea05d?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/141128fea05d</guid>
            <category><![CDATA[administration]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Wed, 17 Jun 2020 14:18:59 GMT</pubDate>
            <atom:updated>2020-06-17T14:23:14.434Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*MfXNvEpuFWKEwHzqJ-l7rw.jpeg" /></figure><p>Users or developers may receive the following error when they attempt to create or update a record in Salesforce:</p><blockquote><strong>Error: Invalid Data. <br>Review all error messages below to correct your data.<br>‘bad value for restricted picklist field: PicklistValue’</strong></blockquote><p>This error occurs when the picklist field referenced in the error message meets each of the following conditions:</p><h3>The referenced picklist field has ‘<strong>Restrict picklist to the values defined in the value set</strong>’ set to Enabled.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*GefHk2-5djKwHIgCr4KYow.png" /><figcaption><strong>Restrict picklist to the values defined in the value set</strong></figcaption></figure><p><strong>Solution: </strong>You need to make sure that you set the right value and it contains in value set or you need to uncheck mentioned above checkbox.</p><blockquote>Check out full article in our company blog post — <a href="https://blog.truesalessoft.com/how-to-fix-bad-value-for-restricted-picklist-field-error/">https://blog.truesalessoft.com/how-to-fix-bad-value-for-restricted-picklist-field-error</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*iaG_biZ3rbUL7J5DgBSP-w.png" /></figure><p><strong>Solution:</strong> You need to make sure that you using <strong>API Name</strong> value for the picklist, not the Label one.</p><h3>The picklist isn’t Available for Editing or a default value is set for the referenced picklist field</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*ntsQGgOM1f4vuLr5twDZtg.png" /></figure><p>When you attempt to save a record in the Object that contains this picklist field, Salesforce attempts to populate the <strong>default value</strong>. Since the <strong>controlling value</strong> is not set and the picklist is restricted to only allow the <strong>dependent values.</strong></p><p><strong>Solution:</strong></p><ul><li>All record types should have the picklist selected in the Selected items section and not under available items</li><li><strong>If the object includes Record Types </strong>— This error occurs if the record type sets the default value.</li><li><strong>If the object does not include Record Types </strong>— This error occurs if the picklist field sets the value.</li></ul><h3>The referenced picklist field is a <strong>dependent picklist.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*mOyjb4SICPsNn1umtdSGRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*BgYT5cmo3wVz4UpGg8O2rQ.png" /></figure><p><strong>Solution:</strong> You need to make sure that the value is available for the selected Controlling field, if not you need to edit Controlling field dependency.</p><h3>Advice: Keeping Picklist usages Safe by Using API Names</h3><p>When you create a picklist field, an API Name that matches the Label is assigned. By default, the API Name can be changed at any time, but you can choose to protect the API Name. A picklist value is identified by either the displayed value or the API Name. Integrations and formulas reference the API Name so it continues to work even if the displayed value changes. An admin can prevent changes to the API Name to protect the references to the fields in formulas or during integrations, such as data import.</p><p>If you faced any issue in the Salesforce <a href="http://www.truesalessoft.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=badvalue&amp;utm_content=footer">TrueSalesSoft </a>team can help you. Just ping us using <a href="http://www.truesalessoft.com/contact.html?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=badvalue&amp;utm_content=footer">Contact </a>page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=141128fea05d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Error: Incorrect parameter type for function ‘ISPICKVAL()’. Expected Text Literal, received Text]]></title>
            <link>https://medium.com/@strusov/error-incorrect-parameter-type-for-function-ispickval-expected-text-literal-received-text-d6a87722a2eb?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6a87722a2eb</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[admin]]></category>
            <category><![CDATA[formula]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[point-and-click]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Wed, 17 Jun 2020 13:48:55 GMT</pubDate>
            <atom:updated>2020-06-17T14:57:44.531Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*wfpbQOhY_lc-EaEaU05GaQ.png" /></figure><p>You can face a strange issue if you creating a formula field and use <strong>ISPICKVAL </strong>function and <strong>Custom Label</strong>.</p><p>I worked on ConnectionStatus__c formula field. I tried to use standard <strong>ISPICKVAL </strong>function with <strong>Custom Label </strong>because I didn’t want to hardcode the values. First version of my formula was:</p><blockquote>IF (</blockquote><blockquote>(ISPICKVAL(Status__c, $Label.Active) || ISPICKVAL(Status__c, $Label.Terminating)) &amp;&amp; ISPICKVAL(Suspended__c, $Label.No),</blockquote><blockquote>$Label.Connected,</blockquote><blockquote>$Label.Disconnected</blockquote><blockquote>)</blockquote><p>But I got the following error:</p><blockquote>Error: Incorrect parameter type for function ‘ISPICKVAL()’. Expected Text Literal, received Text</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZONni6sThf2qwTphZKRxzQ.png" /></figure><p>I was surprised that <strong>ISPICKVAL </strong>function can’t work with <strong>Custom Label </strong>because it was a pretty usual use case. After googling and research Salesforce forums I found the solution. It was to use TEXT function.</p><p>The final version of my formula was:</p><blockquote>IF (</blockquote><blockquote>(TEXT(Status__c) == $Label.Active || TEXT(Status__c) == $Label.Terminating) &amp;&amp; TEXT(Suspended__c) == $Label.No,</blockquote><blockquote>$Label.Connected,</blockquote><blockquote>$Label.Disconnected</blockquote><blockquote>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k5wNaGozGN_2gqtjR3LG7A.png" /></figure><p>It worked as expected.</p><p>If you faced any issue in the Salesforce <a href="https://www.truesalessoft.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ISPICKVAL&amp;utm_content=footer">TrueSalesSoft </a>team can help you. Just ping us using <a href="https://www.truesalessoft.com/contact.html?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ISPICKVAL&amp;utm_content=footer">Contact </a>page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6a87722a2eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to merge Accounts in Salesforce]]></title>
            <link>https://medium.com/@strusov/how-to-merge-accounts-in-salesforce-c1003aa4d4a9?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1003aa4d4a9</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[administration]]></category>
            <category><![CDATA[sales]]></category>
            <category><![CDATA[sales-development]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Thu, 28 May 2020 15:30:04 GMT</pubDate>
            <atom:updated>2020-06-17T14:35:00.738Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*xKY30ab-kL4q1_0T.jpeg" /></figure><p>Data quality is one of <strong>the most important things</strong> you have to watch to get the most out of Salesforce. This helps your sales team to obtain accurate customer data in accordance with various privacy and privacy rules. Salesforce gives you tools for managing duplicates one at a time and across your org, and to track your progress in eliminating duplicates.</p><p><strong>We will show how to merge Accounts in different interfaces and do not forget about a little Salesforce Hack at the end of the article.</strong></p><h3>Salesforce Classic</h3><p>You need to open Accounts Tab and click to Merge Accounts link in the Tools panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_KA-pEVVYYsCoJK0.png" /></figure><p>Then you need to find Account to merge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FUjrpYQ5sHV6H-Nr.png" /></figure><p>The next window will allow you to compare the data and select the right values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ebQIEmFwRkelCOgb.png" /></figure><p>After the press Merge button, Salesforce will apply your changes and several Accounts will be merged in 1 record.</p><blockquote><em>Check out full article in our company blog post — </em><a href="https://blog.truesalessoft.com/how-to-merge-accounts-in-salesforce/"><em>https://blog.truesalessoft.com/how-to-fix-bad-value-for-restricted-picklist-field-error</em></a></blockquote><h3>How to build a link to Account Merge Wizard</h3><p>You can build a link to merge Account programmatically (Apex, JavaScript) or manually using the following pattern:</p><p><a href="https://ed.my.salesforce.com/merge/accmergewizard.jsp?goNext=+Next+&amp;cid={!Account1.Id}&amp;cid={!Account2.Id}&amp;cid={!Account3.Id}">https://ed.my.salesforce.com/merge/accmergewizard.jsp?goNext=+Next+&amp;cid=<strong>{!Account1.Id</strong>}&amp;cid=<strong>{!Account2.Id</strong>}&amp;cid=<strong>{!Account3.Id</strong>}</a> <br>where <strong>{!Account1.Id</strong>} — Account Id that you want select to merge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KizRyTxGjK9PulXZ.png" /></figure><h3>Lightning Experience</h3><p>First of all, you need to put a Potential Duplicates component to your Account layout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*lROCpi0dDJptkDNe.png" /></figure><p>To use this component you need to create and activate Duplicate Rule and Matching Rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/0*D_ttN-wlEzP_jLrR.png" /></figure><p>After that when you reload the page Salesforce will notify you that the current Account has some potential duplicates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2vkHOTbJorzcZhNQ.png" /></figure><p>When you can click to View Duplicates link and open Merge Account Wizard. The user interface will be the same as in Classic Mode but with Lightning styles 🙂 You need to select Accounts to Merge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/0*TayVNdy93Zr3Wbjl.png" /></figure><p>Then you need to select the master record and right values from highlighted fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/0*97VNZVmerQKpDPFF.png" /></figure><p>And the last one — you need to confirm the merge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/0*lRBhfGGOQgvh-PAb.png" /></figure><h3>Bonus: How to clone existing record</h3><p>If you need to clone existing Account or another object in Salesforce you just need to add to Salesforce base URL following data:</p><p><strong>/{!Account.Id}/e?clone=1</strong><br>where <strong>{!Account.Id</strong>} — id of your Account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*MNYcFS5DWCAJRJ2E.png" /></figure><p><strong>If you need help with your Salesforce org, let </strong><a href="https://truesalessoft.com/contact.html"><strong>us</strong></a><strong> know.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1003aa4d4a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LWC: lightning-record-edit-form — set or modify field values onsubmit]]></title>
            <link>https://medium.com/@strusov/lwc-lightning-record-edit-form-set-or-modify-field-values-onsubmit-9f00199bc2a?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f00199bc2a</guid>
            <category><![CDATA[lwc]]></category>
            <category><![CDATA[submit]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[lightning]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 11:22:29 GMT</pubDate>
            <atom:updated>2020-03-23T11:22:29.031Z</atom:updated>
            <content:encoded><![CDATA[<h3>LWC: lightning-record-edit-form — set or modify field values onsubmit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*kTFuV4xritb5St1WP2MnTw.png" /></figure><p>Sometime you need to execute a code before sumbitting the form and set or modify some fields on sObject.</p><p>For example you have following <em>lightning-record-edit-form</em> for Account sObject.</p><pre>&lt;lightning-record-edit-form object-api-name=&quot;Account&quot; <br>                            onsubmit={onSubmitHandler&gt;</pre><pre>&lt;div class=&quot;slds-grid slds-wrap slds-gutters&quot;&gt;<br>    &lt;div class=&quot;slds-col slds-size_1-of-2&quot;&gt;<br>        &lt;lightning-input-field field-name=&quot;Name&quot; variant=&quot;label-stacked&quot;&gt;&lt;/lightning-input-field&gt;<br>    &lt;/div&gt;<br>    &lt;div class=&quot;slds-col slds-size_1-of-2&quot;&gt;<br>        &lt;lightning-input-field field-name=&quot;Phone&quot; variant=&quot;label-stacked&quot;&gt;&lt;/lightning-input-field&gt;<br>    &lt;/div&gt;<br>&lt;/div&gt;</pre><pre>&lt;/lightning-record-edit-form&gt;</pre><p>To modify some fields you can use <em>onsubmit </em>handler. You can get created/updated sObject from <em>event </em>object. After the modifications you need to submit the form.</p><pre>onSubmitHandler(event) {<br>    event.preventDefault();</pre><pre>    // Get data from submitted form<br>    const fields = event.detail.fields;</pre><pre>    // Here you can execute any logic before submit<br>    // and set or modify existing fields<br>    fields.Name = fields.Name + fields.Phone</pre><pre>    // You need to submit the form after modifications<br>    this.template<br>        .querySelector(&#39;lightning-record-edit-form&#39;).submit(fields);<br>}</pre><p>Me and our <a href="http://www.truesalessoft.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=modifyOnSubmit&amp;utm_content=footer">TrueSalesSoft </a>team can help you with any questions related with Salesforce custom development. You can use <a href="http://www.truesalessoft.com/contact.html?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=modifyOnSubmit&amp;utm_content=footer">Contact </a>page on truesalessoft.com.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f00199bc2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[sfdx: how to deploy project to salesforce]]></title>
            <link>https://medium.com/@strusov/sfdx-how-to-deploy-project-to-salesforce-9cf3cbe94a71?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cf3cbe94a71</guid>
            <category><![CDATA[apache-ant]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[sfdx]]></category>
            <category><![CDATA[migration-tool]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Fri, 20 Mar 2020 15:19:59 GMT</pubDate>
            <atom:updated>2020-03-20T15:19:59.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*vV_h9reUjz34JscqcGCEwg.png" /></figure><h3>Problem:</h3><p>We in <a href="http://www.truesalessoft.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=sfdx%3Adeploy-project&amp;utm_content=header">TrueSalesSoft</a> do not like Apache Ant because we need to configure it using xml. It looks out of date. The question is how to deploy Salesforce project without Apache Ant?</p><h3>Solution:</h3><p>We can use Metadata API with sfdx.</p><p><strong>Step 1: You need to setup a connection</strong></p><p>To see a list of existing connections you can use following command:</p><pre><strong>sfdx </strong>force:org:list</pre><p>To add a new connection you can use:</p><pre><strong>sfdx </strong>force:auth:web:login <strong>-r</strong> https://test.salesforce.com <strong>-a</strong> &lt;your_alias&gt;</pre><p><strong>Step 2: You can deploy the project</strong></p><p>To deploy the project directory you can use following command:</p><pre><strong>sfdx </strong>force:mdapi:deploy <strong>-d</strong> &lt;directory&gt; <strong>-u</strong> &lt;username or alias&gt;</pre><p>You can use <strong>-c </strong>to run validation without deployment.</p><p><strong>Step 3: Check the results</strong></p><p>You can use<strong> &lt;job_id&gt; </strong>to check results of the deployment process with following command:</p><pre><strong>sfdx </strong>force:mdapi:deploy:report <strong>-u</strong> &lt;your_alias&gt; <strong>-i</strong> &lt;job_id&gt;</pre><p>If you have any questions regard the problem above or anything else please send it in our contact form on <a href="http://www.truesalessoft.com/contact.html?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=sfdx%3Adeploy-project&amp;utm_content=footer">TrueSalesSoft.com</a> we will help you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cf3cbe94a71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No default record type specified for recordTypeVisibility.]]></title>
            <link>https://medium.com/@strusov/no-default-record-type-specified-for-recordtypevisibility-91c45b67074b?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/91c45b67074b</guid>
            <category><![CDATA[profile]]></category>
            <category><![CDATA[error]]></category>
            <category><![CDATA[solutions]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Thu, 19 Mar 2020 07:41:35 GMT</pubDate>
            <atom:updated>2020-03-19T07:41:35.340Z</atom:updated>
            <content:encoded><![CDATA[<h3>No default record type specified for recordTypeVisibility. To make the ‘ — master — ‘ record type the default, set visible on all record types to false.</h3><h3>Problem:</h3><p>When I worked on a Project for one of our <a href="http://www.truesalessoft.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=recordTypeVisibility&amp;utm_content=header">TrueSalesSoft </a>client I faced with following error during deployment an Admin Profile to my Salesforce Sandbox.</p><pre>No default record type specified for <strong><em>recordTypeVisibility</em></strong>: <strong><em>Asset</em></strong>. To make the &#39;--master--&#39; record type the default, <strong>set visible on all record types to false</strong>.</pre><p>I opened the profile in <a href="https://jetforcer.com/">Jetforcer</a> and found <strong><em>recordTypeVisibility </em></strong>block for <strong><em>Asset</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*Pgs6ZH0KUzSIc9WgYkTDlA.png" /></figure><h3>Solution:</h3><ol><li>Set <strong><em>visible=false </em></strong>of all record types for Asset object to false.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*0m1a3ifN9aGnL6hDDfqf7w.png" /></figure><p>2. Set <strong><em>default=true </em></strong>for particular record type and make it default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*oH3AnbHmg3Nw0eg9xvf-6g.png" /></figure><p>If you have any questions regard problem above or anything else please send it in our contact form on <a href="http://www.truesalessoft.com/contact.html?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=recordTypeVisibility&amp;utm_content=footer">TrueSalesSoft.com</a> we will help you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91c45b67074b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce and Google Analytics integration]]></title>
            <link>https://medium.com/@strusov/salesforce-and-google-analytics-integration-6a94b86116ab?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a94b86116ab</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[consulting]]></category>
            <category><![CDATA[leads]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[google-analytics]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Tue, 04 Jun 2019 10:17:25 GMT</pubDate>
            <atom:updated>2019-06-04T10:19:26.923Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eL6b0XWVHlHvRQ26PC1KDw.jpeg" /></figure><p>Track your Salesforce Leads in Google Analytics is easy that you can imagine.</p><p>Steps:</p><ul><li>setup Google Analytics</li><li>add <a href="https://www.google-analytics.com/"><strong>https://www.google-analytics.com</strong></a><strong> </strong>to Remote Site Settings</li><li>create a Trigger</li></ul><p>Following code snippet you can use for Trigger.</p><p><strong>GaClientId__c</strong> is custom field on Lead object that represent Client Id in Google Analytics.</p><pre><strong>trigger </strong>GoogleAnalyticsLeadTrigger <strong>on </strong>Lead (after insert, after update) {<br>   <strong>for </strong>(Lead lead : Trigger.<em>new</em>) {<br>      Map&lt;String,String&gt; fieldUpdateMap = <strong>new </strong>Map&lt;String,String&gt;();<br>      fieldUpdateMap.put(<strong>&#39;ec&#39;</strong>, <strong>&#39;Salesforce&#39;</strong>);<br>      fieldUpdateMap.put(<strong>&#39;el&#39;</strong>, <strong>&#39;Lead&#39;</strong>);<br>      String cid = (String)lead.get(<strong>&#39;GaClientId__c&#39;</strong>);<br>      fieldUpdateMap.put(<strong>&#39;cid&#39;</strong>, cid);<br>      <br>      String industry = (String)lead.get(<strong>&#39;Industry&#39;</strong>);<br>      String country = (String)lead.get(<strong>&#39;Country&#39;</strong>);<br>      <strong>if </strong>(Trigger.<em>IsInsert</em>) {<br>            fieldUpdateMap.put(<strong>&#39;ea&#39;</strong>, <strong>&#39;Create&#39;</strong>);<br>            <strong>if </strong>(industry != <strong>null </strong>&amp;&amp; industry != <strong>&#39;&#39;</strong>) {<br>               fieldUpdateMap.put(<strong>&#39;cd5&#39;</strong>, industry);<br>            }<br>            <strong>if </strong>(country != <strong>null </strong>&amp;&amp; country != <strong>&#39;&#39;</strong>) {<br>               fieldUpdateMap.put(<strong>&#39;cd9&#39;</strong>, country);<br>            }<br>      } <strong>else if </strong>(Trigger.<em>IsUpdate</em>) {<br>            fieldUpdateMap.put(<strong>&#39;ea&#39;</strong>, <strong>&#39;Update&#39;</strong>);<br>            Lead oldlead = Trigger.<em>oldMap</em>.get(lead.Id);<br>            String oldleadIndustry = (String)oldlead.get(<strong>&#39;Industry&#39;</strong>);<br>            String oldleadCountry = (String)oldlead.get(<strong>&#39;Country&#39;</strong>);<br><br>            <strong>if </strong>(oldleadIndustry != industry &amp;&amp; industry != <strong>null </strong>&amp;&amp; industry != <strong>&#39;&#39;</strong>) {<br>               fieldUpdateMap.put(<strong>&#39;cd5&#39;</strong>, industry);<br>            }<br>            <strong>if </strong>(oldleadCountry != country &amp;&amp; country != <strong>null </strong>&amp;&amp; country != <strong>&#39;&#39;</strong>) {<br>               fieldUpdateMap.put(<strong>&#39;cd9&#39;</strong>, (String)country);<br>            }<br>      }<br><br>      <strong>if </strong>(fieldUpdateMap.containsKey(<strong>&#39;cd5&#39;</strong>) || fieldUpdateMap.containsKey(<strong>&#39;cd9&#39;</strong>)) {<br>         GoogleAnalyticsService.<em>push</em>(fieldUpdateMap);<br>      }<br>   }<br>}</pre><p><strong>GoogleAnalyticsService</strong> is Service class that contains common used code. You can use it in every trigger.</p><pre><strong>public class </strong>GoogleAnalyticsService {<br><br>   <strong>private static final </strong>String <em>trackingId </em>= <strong>&#39;AA-00000000-0&#39;</strong>;<br><br>   <strong>private static </strong>String createGaRequestUrl(Map&lt;String,String&gt; fieldUpdateMap) {<br>      fieldUpdateMap.put(<strong>&#39;v&#39;</strong>, <strong>&#39;1&#39;</strong>);<br>      fieldUpdateMap.put(<strong>&#39;ni&#39;</strong>, <strong>&#39;1&#39;</strong>);<br>      String tid = <em>trackingId</em>;<br>      fieldUpdateMap.put(<strong>&#39;tid&#39;</strong>, tid);<br>      fieldUpdateMap.put(<strong>&#39;t&#39;</strong>, <strong>&#39;event&#39;</strong>);<br><br>      System.PageReference pageReference = <strong>new </strong>System.PageReference(<strong>&#39;&#39;</strong>);<br>      pageReference.getParameters().putAll(fieldUpdateMap);<br>      <strong>return &#39;https://www.google-analytics.com/collect&#39; </strong>+ pageReference.getUrl();<br>   }<br><br>   @future (callout=<strong>true</strong>)<br>   <strong>Public static void </strong>push(Map&lt;String, String&gt; fieldUpdateMap) {<br>      String url = <em>createGaRequestUrl</em>(fieldUpdateMap);<br><br>      GaConnectorLogger.<em>getInstance</em>().add(url, fieldUpdateMap.get(<strong>&#39;el&#39;</strong>), fieldUpdateMap.get(<strong>&#39;ea&#39;</strong>));<br><br>      Http h = <strong>new </strong>Http();<br>      HttpRequest req = <strong>new </strong>HttpRequest();<br>      req.setEndpoint(url);<br>      req.setMethod(<strong>&#39;GET&#39;</strong>);<br>      h.send(req);<br><br>      GaConnectorLogger.<em>getInstance</em>().insertLogs();<br>   }<br>}</pre><p>If you need a help with track your Salesforce data in Google Analytics please let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a94b86116ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to share a code between Aura and Lightning Web component]]></title>
            <link>https://medium.com/@strusov/how-to-share-a-code-between-aura-and-lightning-web-component-a1e1b86f3b61?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1e1b86f3b61</guid>
            <category><![CDATA[aura]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[lighting]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Tue, 09 Apr 2019 07:01:00 GMT</pubDate>
            <atom:updated>2019-04-09T07:01:00.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*cuKTjC3hRgpkB0wVxbdRfw.png" /></figure><p>Now you can build Lightning components using two programming models: Lightning Web Components, and the original model, Aura Components.</p><p>Most of the projects consist of Aura Components but more and more developers trying to use LWC for new components. Developers faced with issue to use common functions in Aura and Lightning Web Components.</p><p>The solution is pretty simple:</p><ol><li>You need to create simple LWC component with <strong>export </strong>function, like this</li></ol><pre>// utils.js<br>export function mySharedFunc(param1, param2) {<br>    //your logic here<br>    return true;<br>}</pre><p>2.<strong> To use this function from Aura component</strong>, you need to add LWC component to Aura cmp and assign aura:id</p><pre>&lt;c:utils aura:id=&quot;utils&quot;/&gt;</pre><p>then in you Aura JS controller you need to find LWC cmponent and call the function</p><pre>component.find(&#39;utils&#39;).mySharedFunc(&#39;string&#39;, 123);</pre><p><strong>3. To use this function from LWC component</strong>, you need to import your component in JS controller</p><pre>import { mySharedFunc } from &quot;c/utils&quot;;</pre><p>Now you can call the function from any method</p><pre>myHandler(value) {<br>    mySharedFunc(&#39;string&#39;, value)<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1e1b86f3b61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with cookies from Lightning]]></title>
            <link>https://medium.com/@strusov/working-with-cookies-from-lightning-79073b2649f9?source=rss-f3355e9461a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/79073b2649f9</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[lighting]]></category>
            <category><![CDATA[lwc]]></category>
            <dc:creator><![CDATA[Sergey Trusov]]></dc:creator>
            <pubDate>Mon, 08 Apr 2019 10:04:39 GMT</pubDate>
            <atom:updated>2019-04-08T10:06:12.933Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*OEck6Xx30QggSQ6Tigydpw.png" /></figure><p>I want to stare with you several ready to use JS functions to working with cookies from Lightning, both Aura Component and Web Components.</p><p><strong>createCookie </strong>function gives an ability to create a cookie with a particular name, value and time to live.</p><pre>function createCookie(name, value, days) {<br>    var expires;<br>    if (days) {<br>        const date = new Date();<br>        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));<br>        expires = &quot;; expires=&quot; + date.toGMTString();<br>    }<br>    else {<br>        expires = &quot;&quot;;<br>    }<br>    document.cookie = name + &quot;=&quot; + escape(value) + expires + &quot;; path=/&quot;;<br>}</pre><p><strong>setCookie </strong>function gives an ability to create a cookie with a particular name, value without expiration time.</p><pre>function setCookies(name, value) {<br>    this.createCookie(name, value, null);<br>}</pre><p><strong>clearCookie </strong>function gives an ability to clear the cookie value by its name</p><pre>function clearCookies(name) {<br>    this.createCookie(name, &#39;&#39;, null);<br>}</pre><p><strong>getCookie </strong>function gives an ability to get the cookie value by its name</p><pre>function getCookie(name) {<br>    var cookieString = &quot;; &quot; + document.cookie;<br>    var parts = cookieString.split(&quot;; &quot; + name + &quot;=&quot;);<br>    if (parts.length === 2) {<br>        return parts.pop().split(&quot;;&quot;).shift();<br>    }<br>    return null;<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79073b2649f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>