tag:blogger.com,1999:blog-42160964433361933832024-03-28T14:49:37.370+05:30Amit Salesforce | Salesforce TutorialSalesforce tutorial | Lightning Web Component | Rest API | CI/CD | Test ClassesAmit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.comBlogger183125tag:blogger.com,1999:blog-4216096443336193383.post-12244339983527720212022-06-30T18:56:00.003+05:302022-06-30T18:56:38.552+05:30A Recipe for Salesforce Architecture<p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;">In the Enterprise IT ecosystem, Salesforce is becoming a significant force in fulfilling business capabilities to achieve the organization’s strategic vision. In this session, we will discuss things architects should think about while composing IT architecture considering the crucial pillars of business, application, data and technology.</p><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;"> </p><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;"><strong style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: 18px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; outline: none; padding: 0px;">Time</strong><span> </span> : SAT July 09, 2022 – 10:00 AM EST ( 7:30 PM IST)</p><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;"><strong style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: 18px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; outline: none; padding: 0px;">Speaker</strong><span> </span>: Vinay Sail</p><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;"><strong style="border: 0px; box-sizing: border-box; font-family: inherit; font-size: 18px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; line-height: inherit; margin: 0px; outline: none; padding: 0px;">RSVP</strong> : Register <a href="https://trailblazercommunitygroups.com/events/details/salesforce-salesforce-developer-group-farmington-united-states-presents-a-recipe-for-salesforce-architecture/" rel="noopener" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #166ab8; cursor: pointer; font-family: inherit; font-size: 18px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: underline; transition: color 0.1s linear 0s;" target="_blank">here</a>.</p><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;"> </p><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px; box-sizing: border-box; color: #666666; font-family: Roboto; font-size: 18px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: inherit; margin: 0px 0px 15px; opacity: 1; orphans: 2; outline: none; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; transition: opacity 0.24s ease-in-out 0s; visibility: visible; white-space: normal; widows: 2; word-spacing: 0px;">Check out the our CTA Playlist<span> </span><a data-saferedirecturl="https://www.google.com/url?q=https://www.youtube.com/playlist?list%3DPLgIMQe2PKPSJXw3x0cPTJhzNyLBgpZV5a&source=gmail&ust=1626472590407000&usg=AFQjCNGCiGIeMifYZbhVV6Gh92IIRs7amA" href="https://www.youtube.com/playlist?list=PLaGX-30v1lh0ECrHwbN3C4hZJ8Msudreh" rel="noopener" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #166ab8; cursor: pointer; font-family: inherit; font-size: 18px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: underline; transition: color 0.1s linear 0s;" target="_blank">YouTube</a>, and don’t forget to <a data-saferedirecturl="https://www.google.com/url?q=https://www.youtube.com/user/developerforce?sub_confirmation%3D1&source=gmail&ust=1626472590407000&usg=AFQjCNG0_1pQFrCOjLgukI6ctjIaXXKhAw" href="http://bit.ly/AhSub" rel="noopener" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #166ab8; cursor: pointer; font-family: inherit; font-size: 18px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: underline; transition: color 0.1s linear 0s;" target="_blank">subscribe to our channel</a>, so that you’re notified right away when a new video is available.</p>Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com5tag:blogger.com,1999:blog-4216096443336193383.post-37932624901826111632020-10-31T23:48:00.007+05:302020-11-01T00:14:08.329+05:30Skinny tables in Salesforce<div><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px none; color: #3a3a3a; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 18px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Use skinny table if performance is not good enough even after using custom indexes- A skinny table is a custom table in the Force.com platform that contains a subset of fields from a standard or custom base Salesforce object. Force.com can have multiple skinny tables if needed, and maintains them and keeps them completely transparent to you.</p><h2 style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px none; color: #3a3a3a; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 18px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="font-size: large;"><b>What is the Skinny table? </b></span><br /></h2><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px none; color: #3a3a3a; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 18px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Salesforce can create skinny tables to contain frequently used fields
and to avoid joins. This can improve the performance of certain
read-only operations. Skinny tables are kept in sync with their source
tables when the source tables are modified.<br /><br />You need to contact Salesforce Customer Support for skinny table. You can’t
create, access, or modify skinny tables yourself. This table shows an Account view, a corresponding database table, and a skinny table that would speed up Account queries</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPBj5q0hdKNMylz7-ndrT2mcBWOFqv4brj16I_7Mz0f26LwXICdJUN-SwEEnHweOZDKUlcm3i2jeyuhPIWUKuvuMUE2xWv9ygdaK_Xr3w8YXbEH00JpsGiewXr5ayhYV1gbWXyrJgJ0XU/s406/Skinny+Table+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="293" data-original-width="406" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPBj5q0hdKNMylz7-ndrT2mcBWOFqv4brj16I_7Mz0f26LwXICdJUN-SwEEnHweOZDKUlcm3i2jeyuhPIWUKuvuMUE2xWv9ygdaK_Xr3w8YXbEH00JpsGiewXr5ayhYV1gbWXyrJgJ0XU/w400-h289/Skinny+Table+1.png" width="400" /></a></div><br /></div><h2 style="text-align: left;"><span style="font-size: large;">How Skinny Tables Can Improve Performance</span></h2><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px none; color: #3a3a3a; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 18px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> What are skinny tables? What makes them fast? For each object table that’s visible to you, Salesforce maintains other, separate tables at the database level for standard and custom fields. This separation, which is invisible to customers, ordinarily requires a join when a query contains both kinds of fields. A skinny table contains both kinds of fields and also omits soft-deleted records<br /></p><ul style="text-align: left;"><li>They avoid resource intensive joins</li><li>Their tables are kept in sync with their source tables when source tables are modified</li><li>They do not include soft deleted records</li><li>Skinny help improve report and query performance in following ways-:</li><li>Skinny tables provide a view across multiple objects for easy access to combined data</li><li>Skinny tables contain frequently used fields and thereby help avoiding joins</li><li>Skinny tables are kept in sync with changes to data in source tables</li><li>Skinny tables can contain the following types of fields : </li><ul><li>Checkbox</li><li>Date</li><li>Date and time</li><li>Email</li><li>Number</li><li>Percent</li><li>Phone</li><li>Picklist (multi-select)</li><li>Text</li><li>Text area</li><li>Text area (long)</li><li>URL</li></ul></ul><h2 style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px none; color: #3a3a3a; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin: 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="font-size: large;">When to Use?</span></h2><p style="-webkit-text-stroke-width: 0px; background-color: white; border: 0px none; color: #3a3a3a; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 18px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Skinny tables are most useful with tables containing millions of records. They can be created on custom objects, and on Account, Contact, Opportunity, Lead, and Case objects. In addition, they can enhance performance for reports, list views, and SOQL. The skinny table allows you to reorganize selected columns and rows of data into a separate table. <br /></p><h2 style="text-align: left;"><span style="font-size: large;">Considerations</span></h2><ul style="text-align: left;"><li>Skinny tables can contain a maximum of 100 columns.</li><li>Skinny tables can’t contain fields from other objects.</li><li>Skinny tables are copied to your Full sandbox orgs.</li><li>Skinny tables aren’t copied to your sandbox organizations. To have production skinny tables activated for sandbox types other than Full sandboxes, contact Salesforce Customer Support.<br /></li></ul>Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com10tag:blogger.com,1999:blog-4216096443336193383.post-62688288218798660762020-09-07T02:34:00.001+05:302020-09-07T02:34:38.478+05:30Polymorphic Relationships in SOQL Queries : TYPEOF<p> Lets understand what is Polymorphic Relationships. In a polymorphic relationship, the referenced object of the relationship can be one of several different types of object for example who and what field on Task and Event Object. Who can be Contact or Lead. </p><h2 style="text-align: left;">Relationship field and Polymorphic field</h2><p>Let understand the different between Relationship field and Polymorphic field</p><p></p><p>
</p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableMediumShading1Accent1" style="border-collapse: collapse; border: none; mso-border-alt: solid #7BA0CD 1.0pt; mso-border-themecolor: accent1; mso-border-themetint: 191; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="mso-yfti-firstrow: yes; mso-yfti-irow: -1;">
<td style="background: #4F81BD; border-right: none; border: solid #7BA0CD 1.0pt; mso-background-themecolor: accent1; mso-border-themecolor: accent1; mso-border-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<div class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2; mso-yfti-cnfc: 5;"><b><span style="font-size: x-large;"><span style="color: white; font-family: "Times New Roman", "serif";">Relationship field</span></span></b></div>
</td>
<td style="background: #4F81BD; border-left: none; border: solid #7BA0CD 1.0pt; mso-background-themecolor: accent1; mso-border-themecolor: accent1; mso-border-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<div><b><span style="font-size: x-large;"><span style="color: white;">Polymorphic field</span></span></b></div>
</td>
</tr>
<tr style="mso-yfti-irow: 0;">
<td style="background: #D3DFEE; border-bottom: solid #7BA0CD 1.0pt; border-left: solid #7BA0CD 1.0pt; border-right: none; border-top: none; mso-background-themecolor: accent1; mso-background-themetint: 63; mso-border-bottom-themecolor: accent1; mso-border-bottom-themetint: 191; mso-border-left-themecolor: accent1; mso-border-left-themetint: 191; mso-border-top-alt: solid #7BA0CD 1.0pt; mso-border-top-themecolor: accent1; mso-border-top-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 68;"><b> </b>OwnerId field of the Account and contact object. Most of the Lookup and master-detail fields.<span> </span><br /></p>
</td>
<td style="background: #D3DFEE; border-bottom: solid #7BA0CD 1.0pt; border-left: none; border-right: solid #7BA0CD 1.0pt; border-top: none; mso-background-themecolor: accent1; mso-background-themetint: 63; mso-border-bottom-themecolor: accent1; mso-border-bottom-themetint: 191; mso-border-right-themecolor: accent1; mso-border-right-themetint: 191; mso-border-top-alt: solid #7BA0CD 1.0pt; mso-border-top-themecolor: accent1; mso-border-top-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
OwnerId field of the event Object. It can be Calender or User. Or Who <br /></td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-bottom: solid #7BA0CD 1.0pt; border-left: solid #7BA0CD 1.0pt; border-right: none; border-top: none; mso-border-bottom-themecolor: accent1; mso-border-bottom-themetint: 191; mso-border-left-themecolor: accent1; mso-border-left-themetint: 191; mso-border-top-alt: solid #7BA0CD 1.0pt; mso-border-top-themecolor: accent1; mso-border-top-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 132;"><b> Example</b></p><p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 132;">Select id, Owner.Name from Account<b> <br /></b></p>
</td>
<td style="border-bottom: solid #7BA0CD 1.0pt; border-left: none; border-right: solid #7BA0CD 1.0pt; border-top: none; mso-border-bottom-themecolor: accent1; mso-border-bottom-themetint: 191; mso-border-right-themecolor: accent1; mso-border-right-themetint: 191; mso-border-top-alt: solid #7BA0CD 1.0pt; mso-border-top-themecolor: accent1; mso-border-top-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 128;"><b>Example</b></p><p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 128;">SELECT Id, Owner.Name FROM Event WHERE Owner.<b>Type </b>= 'User'</p>
</td>
</tr>
<tr style="mso-yfti-irow: 2; mso-yfti-lastrow: yes;">
<td style="background: #D3DFEE; border-bottom: solid #7BA0CD 1.0pt; border-left: solid #7BA0CD 1.0pt; border-right: none; border-top: none; mso-background-themecolor: accent1; mso-background-themetint: 63; mso-border-bottom-themecolor: accent1; mso-border-bottom-themetint: 191; mso-border-left-themecolor: accent1; mso-border-left-themetint: 191; mso-border-top-alt: solid #7BA0CD 1.0pt; mso-border-top-themecolor: accent1; mso-border-top-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 68;">To get Parent record data use dot(.). <b><br /></b></p>
</td>
<td style="background: #D3DFEE; border-bottom: solid #7BA0CD 1.0pt; border-left: none; border-right: solid #7BA0CD 1.0pt; border-top: none; mso-background-themecolor: accent1; mso-background-themetint: 63; mso-border-bottom-themecolor: accent1; mso-border-bottom-themetint: 191; mso-border-right-themecolor: accent1; mso-border-right-themetint: 191; mso-border-top-alt: solid #7BA0CD 1.0pt; mso-border-top-themecolor: accent1; mso-border-top-themetint: 191; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="399">
<p class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 64;"> You can use a TYPEOF clause in a query</p>
</td>
</tr>
</tbody></table>
<p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;"> </span></p><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;">What Field is also polymorphic field on Event/Task object. What about if we need to get field base on SObject Type? We have solution of this problem : TYPEOF.</span></p><h3 class="MsoNormal" style="text-align: left;"><span style="mso-tab-count: 1;">TypeOF</span></h3><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;"><a href="https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_typeof.htm" target="_blank">TYPEOF</a> is an optional clause that can be used in a SELECT statement of a SOQL query when you’re querying data that contains polymorphic relationships. A TYPEOF expression specifies a set of fields to select that depend on the runtime type of the polymorphic reference. TYPEOF is available in API version 46.0 and later (It is also available in API version 26.0 and later as part of a Developer Preview).</span></p><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;"><b>Syntax</b>:</span></p><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;"><span style="mso-tab-count: 1;">SELECT fieldList<br /> TYPEOF typeOfField<br /> WHEN whenObjectType THEN whenFieldList [...]<br /> ELSE elseFieldList<br /> END<br />FROM objectType</span></div><p></p><p> </p><h3 style="text-align: left;">Use Case:<br /></h3><p></p><p>On Task Object "Related To" (What) is Polymorphic field. Which can be account, opportunity or other sobject. If "Related To" (What) field is related to account then we need to get account phone and number of employees fields. If the "Related To" (WhatId) field is related to Opportunity then we need to get amount and closeDate.<br /></p><p>Set see how we can create our query for above requirement.<br /></p><p></p><p></p><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;"><span style="mso-tab-count: 1;">SELECT <br /> TYPEOF What<br /> WHEN Account THEN Phone, NumberOfEmployees<br /> WHEN Opportunity THEN Amount, CloseDate<br /> ELSE Name<br /> END<br />FROM Task<br />WHERE What.Type In ('Account','Opportunity')</span></div><ul style="text-align: left;"><li> In this query we used <b>TYPEOF</b> to <span style="mso-tab-count: 1;">get runtime type of the polymorphic reference field.</span></li><li><span style="mso-tab-count: 1;">We can use the <b>TYPE</b> to filter our query.<br /></span></li></ul><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;"><br /></span></p><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;">Let see how to handle it in Apex Class</span></p><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;"></span></p><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;"><span style="mso-tab-count: 1;">List<Task> listTask = [SELECT<br /> TYPEOF What<br /> WHEN Account THEN Phone, NumberOfEmployees<br /> WHEN Opportunity THEN Amount, CloseDate<br /> ELSE Name<br /> END<br /> FROM Task<br /> WHERE What.Type In ('Account','Opportunity')];<br /> <br />for (Task tsk: listTask) {<br /> if (tsk.What instanceof Account) {<br /> Account acc = tsk.What;<br /> System.debug('--acc--->'+acc.NumberOfEmployees);<br /> } else if (tsk.What instanceof Opportunity) {<br /> Opportunity opp = tsk.What;<br /> System.debug('--opp--->'+opp.CloseDate);<br /> }<br />}</span></div><ol style="text-align: left;"><li><span style="mso-tab-count: 1;"> Use InstanceOf to check the Object Type.<br /></span></li></ol><p class="MsoNormal" style="tab-stops: 316.45pt;"><span style="mso-tab-count: 1;"><br /></span></p>
<p><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
table.MsoTableMediumShading1Accent1
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-tstyle-rowband-size:1;
mso-tstyle-colband-size:1;
mso-style-priority:63;
mso-style-unhide:no;
border:solid #7BA0CD 1.0pt;
mso-border-themecolor:accent1;
mso-border-themetint:191;
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-border-insideh:1.0pt solid #7BA0CD;
mso-border-insideh-themecolor:accent1;
mso-border-insideh-themetint:191;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
table.MsoTableMediumShading1Accent1FirstRow
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:first-row;
mso-style-priority:63;
mso-style-unhide:no;
mso-tstyle-shading:#4F81BD;
mso-tstyle-shading-themecolor:accent1;
mso-tstyle-border-top:1.0pt solid #7BA0CD;
mso-tstyle-border-top-themecolor:accent1;
mso-tstyle-border-top-themetint:191;
mso-tstyle-border-left:1.0pt solid #7BA0CD;
mso-tstyle-border-left-themecolor:accent1;
mso-tstyle-border-left-themetint:191;
mso-tstyle-border-bottom:1.0pt solid #7BA0CD;
mso-tstyle-border-bottom-themecolor:accent1;
mso-tstyle-border-bottom-themetint:191;
mso-tstyle-border-right:1.0pt solid #7BA0CD;
mso-tstyle-border-right-themecolor:accent1;
mso-tstyle-border-right-themetint:191;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
mso-para-margin-top:0in;
mso-para-margin-bottom:0in;
mso-para-margin-bottom:.0001pt;
line-height:normal;
color:white;
mso-themecolor:background1;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading1Accent1LastRow
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:last-row;
mso-style-priority:63;
mso-style-unhide:no;
mso-tstyle-border-top:2.25pt double #7BA0CD;
mso-tstyle-border-top-themecolor:accent1;
mso-tstyle-border-top-themetint:191;
mso-tstyle-border-left:1.0pt solid #7BA0CD;
mso-tstyle-border-left-themecolor:accent1;
mso-tstyle-border-left-themetint:191;
mso-tstyle-border-bottom:1.0pt solid #7BA0CD;
mso-tstyle-border-bottom-themecolor:accent1;
mso-tstyle-border-bottom-themetint:191;
mso-tstyle-border-right:1.0pt solid #7BA0CD;
mso-tstyle-border-right-themecolor:accent1;
mso-tstyle-border-right-themetint:191;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
mso-para-margin-top:0in;
mso-para-margin-bottom:0in;
mso-para-margin-bottom:.0001pt;
line-height:normal;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading1Accent1FirstCol
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:first-column;
mso-style-priority:63;
mso-style-unhide:no;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading1Accent1LastCol
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:last-column;
mso-style-priority:63;
mso-style-unhide:no;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading1Accent1OddColumn
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:odd-column;
mso-style-priority:63;
mso-style-unhide:no;
mso-tstyle-shading:#D3DFEE;
mso-tstyle-shading-themecolor:accent1;
mso-tstyle-shading-themetint:63;}
table.MsoTableMediumShading1Accent1OddRow
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:odd-row;
mso-style-priority:63;
mso-style-unhide:no;
mso-tstyle-shading:#D3DFEE;
mso-tstyle-shading-themecolor:accent1;
mso-tstyle-shading-themetint:63;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;}
table.MsoTableMediumShading1Accent1EvenRow
{mso-style-name:"Medium Shading 1 - Accent 1";
mso-table-condition:even-row;
mso-style-priority:63;
mso-style-unhide:no;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;}
</style>
<![endif]--></p>Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com2tag:blogger.com,1999:blog-4216096443336193383.post-7513295656663520222020-08-12T08:32:00.001+05:302020-08-12T08:32:49.469+05:30Lightning Datatable Sorting in Lightning Web Components<div dir="ltr" style="text-align: left;" trbidi="on">
Last <a href="http://amitsalesforce.blogspot.com/2019/10/lightning-datatable-in-lightning-web-component.html">time</a> we talk about Lightning Datatable in Lightning Web Components (LWC). In this post we will talk about lightning datatable example with sorting in lightning web components. We can achieve the column sorting with the help of <b>onsort </b>attribute in datatable.</div><div dir="ltr" style="text-align: left;" trbidi="on"><br />
<h3 style="text-align: left;">
<span style="font-size: large;">Lightning-datatable</span></h3>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Lightning datatable provides an onsort attribute which allow us to
implement the sorting in lightning datatable. To enable the sorting on
row you need to set sortable to true for the column and set sorted-By to
match the fieldName attribute on the column. </div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib_pBLGgxkDs1Ks48mUV6EOkX1NrneOA_M-avnmXF2idhzwfdAmGXWCHvteFoBDJTdl4T-cRbLhKE-Yy9OrWqQeKY_rvvNXQQ3IeHHdbmeyVNZzFeX-xM4NMu8TI71I4FNbxbzscX3Nck/s1600/Datatable+Sorting+in+LWC.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="221" data-original-width="600" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib_pBLGgxkDs1Ks48mUV6EOkX1NrneOA_M-avnmXF2idhzwfdAmGXWCHvteFoBDJTdl4T-cRbLhKE-Yy9OrWqQeKY_rvvNXQQ3IeHHdbmeyVNZzFeX-xM4NMu8TI71I4FNbxbzscX3Nck/s640/Datatable+Sorting+in+LWC.gif" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Use onsort event handler to update the table with the new column index and sort direction. The sort event returns the following parameter.</div>
<ol style="text-align: left;">
<li><b>fieldName </b>: The fieldName that controls the sorting.</li>
<li><b>sortDirection </b>: The sorting direction. Valid options include 'asc' and 'desc'.</li>
</ol>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
We can implement the sorting in LWC with following ways :-</div>
<ol style="text-align: left;">
<li>sorting locally </li>
<li>via apex call.</li>
</ol>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Local Sorting</span></span></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
We mostly implement this type of sorting when we know data elements in lightning datatable is small and limited</div>
<div style="text-align: left;">
<br /></div>
<ol style="text-align: left;">
<li><b>Create Apex Class </b>: To select certain contacts using SOQL, use an Apex method. Check this post to learn about how to <a href="http://amitsalesforce.blogspot.com/2018/12/Invoke-Apex-Controller-from-Lightning-Web-Component.html">Call Apex Methods in LWC</a>.<br /><b style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">LWCDataTableSortingExample</b><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
public with sharing class LWCDataTableSortingExample {<br /> @AuraEnabled(Cacheable=true)<br /> public static List <Contact> getContacts() {<br /> List<Contact> contList = [ SELECT Id, FirstName, LastName, Phone, Email<br /> FROM Contact<br /> LIMIT 10 ];<br /> return contList;<br /> } <br />}<br /></div>
</li>
<li><b>Create Lightning web component </b>: Create one Lightning web component in <a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html">your developer org or sandbox</a>.<br /><b style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">dataTableSortingLWC.html</b><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br /> <lightning-card title="Data Sorting in Lightning Datatable in LWC" icon-name="standard:contact" ><br /> <br/><br /> <div style="width: auto;"><br /> <template if:true={data}><br /> <lightning-datatable data={data}<br /> columns={columns}<br /> key-field="id"<br /> <b>sorted-by={sortBy}<br /> sorted-direction={sortDirection}<br /> onsort={doSorting}</b><br /> hide-checkbox-column="true"></lightning-datatable><br /> </template><br /> </div><br /> </lightning-card><br /></template></div>
<ul>
<li>In lightning datatable use sorted-by and sorted-direction attribute to define the direction and sorted column.</li>
<li>use onsort event to call javascript function to sort your local data.</li>
</ul>
<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><b style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">dataTableSortingLWC.js</b><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import {LightningElement, wire, track} from 'lwc';<br />import getContacts from '@salesforce/apex/LWCDataTableSortingExample.getContacts';<br /><br />// datatable columns with row actions. Set sortable = true<br />const columns = [ { label: 'FirstName', fieldName: 'FirstName', <b>sortable: "true"</b>},<br /> { label: 'LastName', fieldName: 'LastName', sortable: "true"},<br /> { label: 'Phone', fieldName: 'Phone', type: 'phone', sortable: "true"},<br /> { label: 'Email', fieldName: 'Email', type: 'email', sortable: "true" },];<br /><br />export default class DataTableSortingLWC extends LightningElement {<br /> @track data;<br /> @track columns = columns;<br /> @track sortBy;<br /> @track sortDirection;<br /> <br /> @wire(getContacts)<br /> contacts(result) {<br /> if (result.data) {<br /> this.data = result.data;<br /> this.error = undefined;<br /> } else if (result.error) {<br /> this.error = result.error;<br /> this.data = undefined;<br /> }<br /> }<br /><br /><b> doSorting(event) {<br /> this.sortBy = event.detail.fieldName;<br /> this.sortDirection = event.detail.sortDirection;<br /> this.sortData(this.sortBy, this.sortDirection);<br /> }<br /><br /> sortData(fieldname, direction) {<br /> let parseData = JSON.parse(JSON.stringify(this.data));<br /> // Return the value stored in the field<br /> let keyValue = (a) => {<br /> return a[fieldname];<br /> };<br /> // cheking reverse direction<br /> let isReverse = direction === 'asc' ? 1: -1;<br /> // sorting data<br /> parseData.sort((x, y) => {<br /> x = keyValue(x) ? keyValue(x) : ''; // handling null values<br /> y = keyValue(y) ? keyValue(y) : '';<br /> // sorting values based on direction<br /> return isReverse * ((x > y) - (y > x));<br /> });<br /> this.data = parseData;<br /> } </b> <br />}</div>
<ul>
<li> On which column you want to enable the sorting use sortable: "true"</li>
<li>Call your javaScript sorting method from onSorting event. </li>
</ul>
<b style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">dataTableSortingLWC.js-meta.xml</b><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<?xml version="1.0" encoding="UTF-8"?><br /><LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="dataTableSortingLWC"><br /> <apiVersion>46.0</apiVersion><br /> <isExposed>true</isExposed><br /> <targets><br /> <target>lightning__AppPage</target><br /> <target>lightning__RecordPage</target><br /> <target>lightning__HomePage</target><br /> </targets><br /></LightningComponentBundle></div>
</li>
</ol>
<h3 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Sorting by Apex Call</span></span></h3>
<br />
We also have another way of data sorting with Apex class.<br /><br />
<ol style="text-align: left;">
<li>Create Apex Class : Update your apex method and include sord column and sort order.<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
public with sharing class LWCDataTableSortingExample {<br /> @AuraEnabled(Cacheable=true)<br /> public static List <Contact> getContacts(<b>String field, String sortOrder</b>) {<br /> String query;<br /> query = 'SELECT Id, FirstName, LastName, Phone, Email FROM Contact';<br /> <b>if(field != null && sortOrder !=null){<br /> query += ' ORDER BY '+field+' '+sortOrder;<br /> }</b><br /> return Database.query(query);<br /> }<br />}</div>
</li>
<li>Create Lightning web components :- No change required in html file.<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br /> <lightning-card title="Data Sorting in Lightning Datatable in LWC" icon-name="standard:contact" ><br /> <br/><br /> <div style="width: auto;"><br /> <template if:true={data}><br /> <lightning-datatable data={data}<br /> columns={columns}<br /> key-field="id"<br /> sorted-by={sortBy}<br /> sorted-direction={sortDirection}<br /> onsort={doSorting}<br /> hide-checkbox-column="true"></lightning-datatable><br /> </template><br /> </div><br /> </lightning-card><br /></template></div>
<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import {LightningElement, wire, track} from 'lwc';<br />import getContacts from '@salesforce/apex/LWCDataTableSortingExample.getContacts';<br /><br />// datatable columns with row actions. Set sortable = true<br />const columns = [ { label: 'FirstName', fieldName: 'FirstName', sortable: "true"},<br /> { label: 'LastName', fieldName: 'LastName', sortable: "true"},<br /> { label: 'Phone', fieldName: 'Phone', type: 'phone', sortable: "true"},<br /> { label: 'Email', fieldName: 'Email', type: 'email', sortable: "true" },];<br /><br />export default class DataTableSortingLWC extends LightningElement {<br /> @track data;<br /> @track columns = columns;<br /> @track sortBy='FirstName';<br /> @track sortDirection='asc';<br /> <br /> // retrieving the data using wire service<br /> <b> @wire(getContacts,{field : '$sortBy',sortOrder : '$sortDirection'})</b><br /> contacts(result) {<br /> if (result.data) {<br /> this.data = result.data;<br /> this.error = undefined;<br /> } else if (result.error) {<br /> this.error = result.error;<br /> this.data = undefined;<br /> }<br /> }<br /> doSorting(event) {<br /> // calling sortdata function to sort the data based on direction and selected field<br /> this.sortBy = event.detail.fieldName;<br /> this.sortDirection = event.detail.sortDirection;<br /> }<br />}</div>
<ul>
<li> Retrieving the data using wire service. Wire will automatically call your apex class when sort field or direction will change</li>
<li>Call onSorting method when sort event will fire. </li>
</ul>
</li>
</ol>
<br />
If you want to load to many record on one single page then use <a href="http://amitsalesforce.blogspot.com/2020/07/lazy-loading-in-lightning-web-component.html">Lazy loading in dataTable</a>.<br />
<br />
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com2tag:blogger.com,1999:blog-4216096443336193383.post-64448365416833990522020-08-03T06:00:00.000+05:302020-08-03T06:00:03.106+05:30Modal/Popup in Lightning Web Component (LWC)<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">In this post we will talk about how to create modal/Popup in Lightning web Component (LWC). Currently "</span><span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="background-color: rgba(255 , 255 , 255 , 0.97); color: black; display: inline; float: none; font-family: "consolas" , "monaco" , "andale mono" , monospace; font-size: 13px; font-style: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">lightning:overlayLib</span>" is not available in LWC, the only way to show modals and popups is through styling and making a custom html modal. Modals/Popup Box are used to display content in a layer above the app. Mostly used to creation or editing of a record, as well as various types of messaging and wizards.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5yvSJWr2b0C0ULqTaeDcSZUpe9LhQkPdlJfzt8TUrGCK1yC2b5ZeoAmWd80cIdaku1mcI7CcvOZJaqlMvnbQZ0OGCaOVMekhElql5o5qvHNeo2j05hw8pwb3pNVudZtPw1n-MduNRIMM/s1600/ModalPopup+in+Lightning+Web+Component+%2528LWC%2529.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="203" data-original-width="600" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5yvSJWr2b0C0ULqTaeDcSZUpe9LhQkPdlJfzt8TUrGCK1yC2b5ZeoAmWd80cIdaku1mcI7CcvOZJaqlMvnbQZ0OGCaOVMekhElql5o5qvHNeo2j05hw8pwb3pNVudZtPw1n-MduNRIMM/s640/ModalPopup+in+Lightning+Web+Component+%2528LWC%2529.gif" width="640" /></a></div>
<br />
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">If you want to know how to create Modal in Lightning aura component, please refer to <a href="http://amitsalesforce.blogspot.com/2018/09/modal-popup-in-lightning-component.html">this post</a>.</span></span><br />
<br />
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"></span><br />
<h2 style="text-align: left;">
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Modal / Popup Example Lightning Web component(LWC)</span></h2>
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"></span><br />
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">You can take a help from <a href="https://www.lightningdesignsystem.com/components/modals/#site-main-content" target="_blank">SLDS </a>for creating the modals. Code has following three main part</span><br />
<ul style="text-align: left;">
<li><span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">section</span></li>
<li><span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">header</span></li>
<li><span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">footer</span></li>
</ul>
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"></span><br />
<a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html" target="_blank">Create Lightning web component </a>in your sandbox or developer org.<br />
<br />
<b>modalDemoInLWC.html</b><br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br />
<lightning-button variant="success" label="Open popup"<br />
title="Open popup" onclick={showModalBox}><br />
</lightning-button><br />
<br />
<!-- modal start --> <br />
<template if:true={isShowModal}><br />
<br />
<!--<br />
I Used SLDS for this code<br />
Here is link https://www.lightningdesignsystem.com/components/modals/<br />
--> <br />
<br />
<section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open"><br />
<div class="slds-modal__container"><br />
<!-- modal header start --><br />
<header class="slds-modal__header"><br />
<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={hideModalBox}><br />
<lightning-icon icon-name="utility:close"<br />
alternative-text="close"<br />
variant="inverse"<br />
size="small" ></lightning-icon><br />
<span class="slds-assistive-text">Close</span><br />
</button><br />
<h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Welcome in Apex Hours</h2><br />
</header><br />
<br />
<!-- modal body start --><br />
<div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1"><br />
<p>Modal/Popup in Lightning Web Component (LWC) Demo</p><br />
</div><br />
<br />
<!-- modal footer start--><br />
<footer class="slds-modal__footer"><br />
<button class="slds-button slds-button_neutral" onclick={hideModalBox}>Cancel</button><br />
</footer><br />
<br />
</div><br />
</section><br />
<div class="slds-backdrop slds-backdrop_open"></div><br />
</template><br />
<!-- modal end --><br />
<br />
</template></div>
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<ul style="line-height: 1.4; list-style: disc; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="border: none; margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;">Enable and disable the modal with template if:true</li>
<li style="border: none; margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;">Use section role='dialog' </li>
</ul>
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br class="Apple-interchange-newline" /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<b>modalDemoInLWC.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import { LightningElement,track } from 'lwc';<br />
<br />
export default class ModalDemoInLWC extends LightningElement {<br />
@track isShowModal = false;<br />
<br />
showModalBox() { <br />
this.isShowModal = true;<br />
}<br />
<br />
hideModalBox() { <br />
this.isShowModal = false;<br />
}<br />
}</div>
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br class="Apple-interchange-newline" />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<b>modalDemoInLWC.js-meta.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<?xml version="1.0" encoding="UTF-8"?><br />
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"><br />
<apiVersion>48.0</apiVersion><br />
<isExposed>true</isExposed><br />
<targets> <br />
<target>lightning__AppPage</target><br />
<target>lightning__RecordPage</target><br />
<target>lightning__HomePage</target><br />
</targets><br />
</LightningComponentBundle></div>
</div>
<br class="Apple-interchange-newline" />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
</div>
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com24tag:blogger.com,1999:blog-4216096443336193383.post-19926255193194292152020-07-27T11:30:00.004+05:302020-07-27T11:30:02.820+05:30Share Custom labels between Lightning Web Components <div dir="ltr" style="text-align: left;" trbidi="on">
<div>
We know <a href="http://amitsalesforce.blogspot.com/2020/07/custom-label-in-lightning-web-components-lwc.html" target="_blank">how to use </a>custom label in lightning web components. What about if you have large list of labels and you want to to use in multiple LWC components? In this post we will talk about best practice to import bulk custom label in LWC and how to create utility class to import same set of label in multiple Lightning web components.</div>
<div>
<br /></div>
You can create a utility component that imports all the labels and then exposes them bundled together in one object via a method. Then your main component will have a cleaner list of imports.<br />
<div>
<br /></div>
<div>
<h2 style="text-align: left;">
<span style="font-size: large;">Step 1) Create Utility Class.</span></h2>
</div>
<div>
<br /></div>
<div>
Create a Lightning web component that contains only a single Js file. Like below structure</div>
<div>
<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
labelUtility<br />
├──labelUtility.js<br />
└──labelUtility.js-meta.xml</div>
</div>
<div>
<br /></div>
<div>
Lets create one common label Utility component.</div>
<div>
<br /></div>
<div>
<div>
<b>labelUtility.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import header from '@salesforce/label/c.Header';<br />
import title from '@salesforce/label/c.title';<br />
<br />
const label = {<br />
header: header,<br />
title: title<br />
};<br />
<br />
export {label};</div>
</div>
<div>
<ul style="text-align: left;">
<li>The module should only have a JS file & Metadata file in it, otherwise it will not work.</li>
<li>Just like with any Lightning web component, the folder name and the filename must be identical</li>
<li>Imports all the labels and then exposes them bundled together with export.</li>
</ul>
<div>
<br /></div>
</div>
<div>
<div>
<h2 style="text-align: left;">
<span style="font-size: large;">Step 2) How to use shared label Utility</span></h2>
</div>
<br />
Create new Lightning web component and import Js file with import statement like below</div>
<div>
<br />
<div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import { label } from 'c/labelUtility';</div>
</div>
<div>
<br />
Let see the full code.</div>
<div>
<br />
<div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import { LightningElement,track } from 'lwc';<br />
import { label } from 'c/labelUtility';<br />
export default class CustomLabelDemo extends LightningElement {<br />
@track myLabel=label;<br />
} </div>
</div>
<ul style="text-align: left;">
<li>Import JS file with import</li>
</ul>
</div>
<div>
<br />
<div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br />
<lightning-card title={myLabel.title} variant="narrow" icon-name="standard:opportunity"><br />
<p>{myLabel.header}</p><br />
</lightning-card><br />
</template> </div>
</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Please share your feedback and comment if there is any better way to implement or your like this post.</div>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com9tag:blogger.com,1999:blog-4216096443336193383.post-12697836933441949552020-07-21T03:30:00.001+05:302020-07-21T03:30:02.023+05:30Custom Label in Lightning Web Components (LWC)<div>In this post we will talk about how to use custom label in lightning web components (LWC). Custom labels are text values stored in Salesforce that can be translated into any language that Salesforce supports. We use custom labels to create <a href="http://amitsalesforce.blogspot.com/2015/01/translation-workbench-salesforce.html" target="_blank">multilingual applications</a>. Let see<span style="color: #2b00fe;"> <span style="color: black;">how to access custom Label in Lightning Web Components.</span></span></div><div><span style="color: #2b00fe;"><span style="color: black;"></span></span></div><div></div><div></div><div><br /></div><div>To import a label in a Lightning Web Component, use @salesforce/label in an import statement</div><div><br /></div><div><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">import labelName from '@salesforce/label/label-reference';</div></div><div><ol style="text-align: left;"><li><b>labelName</b>: It is name that refers to the label in LWC.</li><li><b>labelReference</b>: The name of the label in your org.<br /></li></ol></div><div></div><div></div><div><b>Custom Labels In Lightning Web Component(LWC) Example<br /></b></div><div><br /></div><div>create lightning web component in your sandbox or developer org.</div><div><b><br /></b></div><div><b>customLabelDemo.html </b><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;"><template><br /> <lightning-card title={label.title} variant="narrow" icon-name="standard:opportunity"><br /> <p>{label.header}</p><br /> </lightning-card><br /></template></div></div><div style="text-align: left;"><ul><li>To use the labels in the template, use the same {property} syntax that you use to reference any JavaScript property</li></ul></div><div><div></div><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><b>customLabelDemo.js</b> <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">import { LightningElement } from 'lwc';<br />import header from '@salesforce/label/c.Header';<br />import title from '@salesforce/label/c.Title';<br />export default class CustomLabelDemo extends LightningElement {<br /><br /> label = {<br /> header,<br /> title<br /> };<br />}</div><div><ul style="text-align: left;"><li>Use import statement to get the label in Lwc.</li><li>Then Expose the labels to use in the template using property<br /></li></ul><b>customLabelDemo.js-meta.xml</b><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;"><?xml version="1.0" encoding="UTF-8"?><br /><LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"><br /> <apiVersion>48.0</apiVersion><br /> <isExposed>true</isExposed><br /> <targets><br /> <target>lightning__AppPage</target><br /> <target>lightning__RecordPage</target><br /> <target>lightning__HomePage</target><br /> </targets><br /></LightningComponentBundle></div></div></div><div><br /></div><div><b>Result</b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqNO1G5VQi-BXtu4O5uo_GWxe7FAwXihqkSkLlrWTINk_wE6xaWAokFHK-QE0_8pOXnhFeKbXmnFHK4mN2d0ULRZ_C8iBefIpezXoLantQ-hjEa9NXVSs-Jq9kr2ksb3TwwDREJ5hVfEo/s618/How+to+use+Custom+label+in+LWC.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="128" data-original-width="618" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqNO1G5VQi-BXtu4O5uo_GWxe7FAwXihqkSkLlrWTINk_wE6xaWAokFHK-QE0_8pOXnhFeKbXmnFHK4mN2d0ULRZ_C8iBefIpezXoLantQ-hjEa9NXVSs-Jq9kr2ksb3TwwDREJ5hVfEo/s320/How+to+use+Custom+label+in+LWC.PNG" width="469" /></a></div><div><br /></div><div><br /></div><div><br /></div>Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-5583071768012415662020-07-13T05:44:00.001+05:302020-07-13T05:44:57.579+05:30Code Layout and Formatting<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
In our <a href="http://amitsalesforce.blogspot.com/2020/06/salesforce-naming-conventions-best.html">last </a>post we talk about Salesforce Naming Conventions Best Practices and this time we will talk about code layout and formatting. A good developer should strive to use a
consistent layout and format. It will make the life easy for other developers and code reviewer.<br />
<br />
<span style="mso-fareast-font-family: "Times New Roman";">Different
teams and projects may have different standards and when contributing
to a project, you should follow your team and company standards. </span>I have listed a few
guidelines for Salesforce Developer to format the code:- <br />
<ul style="text-align: left;">
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><b><span style="mso-fareast-font-family: "Times New Roman";">Code Comments Best Practices: </span></b><span style="mso-fareast-font-family: "Times New Roman";">When any developer look into your code he should understand what is going in your code easily. Means your code should be "self-documented".</span></li>
<ul>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";"><u><i>Class Level Comment </i></u>: All Classes and Triggers should begin with a brief comment describing the functional </span><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
/*<br />
*********************************************************<br />
Apex Class Name : MyController<br />
Created Date : July 12, 2020<br />
Description : This is class is used for....<br />
Created by : Amit Chaudhary<br />
Modification Log:<br />
*********************************************************<br />
*/</div>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";"><u><i>Method level Comment </i></u>: All methods must have a @Description section, describing what the method is designed to process. They should have @param section for input parameters and @return for output.</span><br /><span style="mso-fareast-font-family: "Times New Roman";"><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /></span><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
/*<br />
*********************************************************<br />
@Method Name : createUser<br />
@Description : method to is used to create usser<br />
@Parameters : <br />
@Returns : Output<br />
********************************************************<br />
*/</div>
</li>
</ul>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";"><b>Spaces: </b>White space is commonly used to enhance readability. Here is one example with no spaces. </span><span style="mso-fareast-font-family: "Times New Roman";"><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /></span><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
Integer i;<br />
for(i=0;i<10;i++){<br />
System.debug("Value"+i);<br />
}</div>
<span style="mso-fareast-font-family: "Times New Roman";">Now check below code with proper white spaces.</span><br /><span style="mso-fareast-font-family: "Times New Roman";"><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /></span><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
Integer i;<br />
for(i=0; i<10; i++){<br />
System.debug("Value" + i);<br />
}</div>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";"><b>Blank Lines :</b> Blank lines improve readability by setting off section of code that are logically related.</span><ul>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><u><i><span style="mso-fareast-font-family: "Times New Roman";">One blank line</span></i></u></li>
<ul>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";">leave an empty line after a closing function brace</span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";">between the local variable in a method and its first statement</span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";">Method definitions within a class are surrounded by a single blank line</span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";">between logical section inside a method to improve readability</span></li>
</ul>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><u><i><span style="mso-fareast-font-family: "Times New Roman";">Two blank lines</span></i></u></li>
<ul style="text-align: left;">
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";">Surround function and class definitions with two blank lines </span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";">Between class and Interface definitions</span></li>
</ul>
</ul>
<span style="mso-fareast-font-family: "Times New Roman";"><b> </b></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";"><b>Indentation </b>:
Use four spaces per indentation level. Usually we use [Tab]
key to indent, but most editors can be configured to insert spaces
instead of actual tab characters. </span><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
if( age > 24){<br />
return true;<br />
} else {<br />
return false;<br />
}</div>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><b><span style="mso-fareast-font-family: "Times New Roman";">Wrapping Lines </span></b><span style="mso-fareast-font-family: "Times New Roman";">: When an expression
will not fit on a single line. </span><span style="mso-fareast-font-family: "Times New Roman";"><span style="mso-fareast-font-family: "Times New Roman";"><span style="mso-fareast-font-family: "Times New Roman";"><span style="mso-fareast-font-family: "Times New Roman";">Keeping lines to a small width
allows scripts to be read in one direction (top to bottom) without
scrolling back-and-forth horizontally</span>.</span></span> Break it according to these general principles</span><span style="mso-fareast-font-family: "Times New Roman";"><br /></span></li>
<ul>
<li class="MsoNormal" style="mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="mso-fareast-font-family: "Times New Roman";"><span style="mso-fareast-font-family: "Times New Roman";">Limit
lines to 115 characters when possible</span></span></li>
<li class="MsoNormal" style="mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="mso-fareast-font-family: "Times New Roman";">Break after a
comma and before an
operator</span></li>
<li class="MsoNormal" style="mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="mso-fareast-font-family: "Times New Roman";">Align the new
line with the beginning of the expression at the same level on the
previous line.</span></li>
<li class="MsoNormal" style="margin-bottom: 12.0pt; mso-list: l0 level2 lfo1; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="mso-fareast-font-family: "Times New Roman";">If the above
rules lead to confusing code or to code that's squished up against the
right margin, just indent spaces instead. </span></li>
</ul>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><b><span style="mso-fareast-font-family: "Times New Roman";">Placement</span></b><span style="mso-fareast-font-family: "Times New Roman";"> : Put declarations only
at the beginning of blocks. (A block is any code surrounded by curly
braces "{" and "}".) </span><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
<span style="mso-fareast-font-family: "Times New Roman";">void myMethod() {<br />
if (condition) {<br />
} else {<br />
}<br />
}</span></div>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><b><span style="mso-fareast-font-family: "Times New Roman";">Remove Debug Statements : </span></b><span style="mso-fareast-font-family: "Times New Roman";"><span style="font-family: "times new roman" , "serif"; font-size: 12.0pt;">Remove debug statements from the code once done
with testing.</span></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="mso-fareast-font-family: "Times New Roman";"><span style="font-family: "times new roman" , "serif"; font-size: 12.0pt;"><b>SOQL </b>: Split each logical grouping into it's own line.</span></span><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
SELECT Id,<br /> Name<br />FROM Account<br />WHERE Name like '%ApexHours%'<br />LIMIT 10</div>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><br /></li>
</ul>
</div>
<span style="mso-fareast-font-family: "Times New Roman";"></span><br />
<span style="mso-fareast-font-family: "Times New Roman";"><br /></span>
<span style="mso-fareast-font-family: "Times New Roman";">Feel free to provide more best practices. I would love to add those in this blog post.</span><br />
<span style="mso-fareast-font-family: "Times New Roman";">.</span><br />
<div>
<ul style="text-align: left;">
</ul>
</div>
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-39790392331781961622020-07-01T21:17:00.000+05:302020-07-15T04:39:51.711+05:30Lazy loading in Lightning Web Component<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikzfjDVyRDQYQpAVMtLl-xKnSdAskrI8wZH1om6e_2uXo1s0cHi7Z71o7a8znCG2_5Mz1vK7ijZ2lLin4pEq4Q-GB-dp-F2GiJv_QbP7OBM-zbPMXAImI94qGobRpKnUFWRoVIKbur0gw/s1600/Lazy+loading+in+Lightning+Web+Component+Infinite+Scrolling.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="725" data-original-width="1528" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikzfjDVyRDQYQpAVMtLl-xKnSdAskrI8wZH1om6e_2uXo1s0cHi7Z71o7a8znCG2_5Mz1vK7ijZ2lLin4pEq4Q-GB-dp-F2GiJv_QbP7OBM-zbPMXAImI94qGobRpKnUFWRoVIKbur0gw/s640/Lazy+loading+in+Lightning+Web+Component+Infinite+Scrolling.PNG" width="640" /></a></div>
In this post we will talk about How to implement Infinity or lazy loading in Lightning Web Component using Lightning Datatable. Lazy loading helps you to load the data only when it is required. Infinite scrolling (<b><span style="color: blue;">enable-infinite-loading</span>)</b> enables you to load a subset of data and then load more data when users scroll to the end of the table.<br />
<br />
In this post we will learn about <a href="http://amitsalesforce.blogspot.com/2019/10/lightning-datatable-in-lightning-web-component.html">lightning datatable </a>attributes <b><span style="color: blue;">enable-infinite-loading</span> </b>and <b><span style="color: blue;">load more offset</span></b>.<br />
<ul style="text-align: left;">
<li><b>enable-infinite-loading</b> : You can load a subset of data and then display more<br />when users scroll to the end of the table. Use with the <span style="color: blue;">onloadmore </span>event handler to retrieve more data</li>
<li><b>load-more-offset</b> : Determines when to trigger infinite loading based on how many pixels the table's scroll position is from the bottom of the table. The default is 20</li>
<li> <b>onloadmore </b>: The action triggered when infinite loading loads more data </li>
</ul>
In below image you can check the demo for Lightning Data Table With Lazy Loading. As we load data partially and once the user scrolls down at the end then we load the next set of data. So it is very responsive.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuHbAi9-LkuXRs68r6yLZq7ssinTNbZG24NICvOFyyKUEmp1sRDB0r3poZpy8aLklt_-Cdzz9ubVqvN7UUuxPxcyv9F6gILWCLFqgTm_Svs5028LR1rwckeahyHiplDbW5NoNujeN0sFI/s1600/Lazy+Infinite+loading+in+Lightning+Web+Component.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="348" data-original-width="600" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuHbAi9-LkuXRs68r6yLZq7ssinTNbZG24NICvOFyyKUEmp1sRDB0r3poZpy8aLklt_-Cdzz9ubVqvN7UUuxPxcyv9F6gILWCLFqgTm_Svs5028LR1rwckeahyHiplDbW5NoNujeN0sFI/s640/Lazy+Infinite+loading+in+Lightning+Web+Component.gif" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Lets see how we can implement the same.<br />
<br />
<h3 style="text-align: left;">
Step 1) Apex Class with offSet</h3>
<br />
LazyLoadingController<br />
<br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<br class="Apple-interchange-newline" />
public with sharing class LazyLoadingController {<br />
<br />
@AuraEnabled(cacheable=true)<br />
public static List<Account> getAccounts(Integer limitSize, Integer offset){<br />
List<Account> accountList = [SELECT Id,Name,Rating<br />
FROM Account <br />
ORDER BY CreatedDate<br />
LIMIT :limitSize<br />
OFFSET :offset<br />
];<br />
return accountList;<br />
}<br />
}</div>
We will <a href="http://amitsalesforce.blogspot.com/2018/12/Invoke-Apex-Controller-from-Lightning-Web-Component.html"><span style="color: blue;">call same apex class</span> </a>from lightning web component.<br />
<br />
<h3>
Step 2) Lightning web component with Datatable</h3>
<br class="Apple-interchange-newline" />
Create lightning web component in your sandbox or developer org. If you new please check this post how to <a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html">create lightning web component in non-scratch org</a>.<br />
<br class="Apple-interchange-newline" />
<b>lazyLoadingLWCDemo.html</b><br />
<br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br />
<div style="height:500px"><br />
<lightning-datatable key-field="Id" <br />
data={accounts} <br />
columns={columns} <br />
enable-infinite-loading<br />
onloadmore={loadMoreData}<br />
hide-checkbox-column="true" <br />
show-row-number-column="true"><br />
</lightning-datatable> <br />
</div><br />
</template></div>
To enable infinite scrolling, specify enable-infinite-loading and provide an event handler using onloadmore.<br />
<br />
<b><br /></b>
<b>lazyLoadingLWCDemo.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<br class="Apple-interchange-newline" />
import { LightningElement, track, wire } from 'lwc';<br />
import getAccounts from '@salesforce/apex/LazyLoadingController.getAccounts';<br />
<br />
const columns = [ <br />
{ label: 'Id', fieldName: 'Id', type: 'text' },<br />
{ label: 'Name', fieldName: 'Name', type: 'text'},<br />
{ label: 'Rating', fieldName: 'Rating', type: 'text'}<br />
<br />
];<br />
<br />
export default class LazyLoadingLWCDemo extends LightningElement {<br />
accounts=[];<br />
error;<br />
columns = columns;<br />
rowLimit =25;<br />
rowOffSet=0;<br />
<br />
connectedCallback() {<br />
this.loadData();<br />
}<br />
<br />
loadData(){<br />
return getAccounts({ limitSize: this.rowLimit , offset : this.rowOffSet })<br />
.then(result => {<br />
let updatedRecords = [...this.accounts, ...result];<br />
this.accounts = updatedRecords;<br />
this.error = undefined;<br />
})<br />
.catch(error => {<br />
this.error = error;<br />
this.accounts = undefined;<br />
});<br />
}<br />
<br />
loadMoreData(event) {<br />
const currentRecord = this.accounts;<br />
const { target } = event;<br />
target.isLoading = true;<br />
<br />
this.rowOffSet = this.rowOffSet + this.rowLimit;<br />
this.loadData()<br />
.then(()=> {<br />
target.isLoading = false;<br />
}); <br />
}<br />
<br />
<br />
}</div>
We create connectedCallback function to load the initial data and then we are useing loadmoreData function to load more record from Apex base on offset. The onloadmore event handler retrieves more data when you scroll to the bottom of the table until there are no more data to load. To display a spinner while data is being loaded, set the <span style="color: blue;"><b>isLoading </b></span>property to true<br />
<br class="Apple-interchange-newline" />
<b><br class="Apple-interchange-newline" /></b>
<b>lazyLoadingLWCDemo.js-meta.xml</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<?xml version="1.0" encoding="UTF-8"?><br />
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"><br />
<apiVersion>48.0</apiVersion><br />
<isExposed>true</isExposed><br />
<targets><br />
<target>lightning__AppPage</target><br />
<target>lightning__RecordPage</target><br />
<target>lightning__HomePage</target><br />
</targets> <br />
</LightningComponentBundle></div>
<br />
<br />
<br />
Reference blog<br />
<ol style="text-align: left;">
<li><a href="http://amitsalesforce.blogspot.com/search/label/Lightning%20Datatable">Datatable</a></li>
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_offset.htm">OffSet</a> </li>
</ol>
<br />
Further Learning<br />
<ol style="text-align: left;">
<li><a href="http://amitsalesforce.blogspot.com/2019/10/lightning-datatable-in-lightning-web-component.html">Lightning datatable In Lightning Web Components</a></li>
<li><a href="https://amitsalesforce.blogspot.com/2020/01/lightning-datatable-sorting-in.html">Lightning Datatable Sorting in Lightning Web Components</a></li>
</ol>
<br /><br />
<br />
<br />
<br />
Please share your feedback and let me know if this code can be improve.</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com9tag:blogger.com,1999:blog-4216096443336193383.post-47049971175374627402020-06-27T23:33:00.001+05:302020-07-22T03:14:45.615+05:30Salesforce Naming Conventions Best Practices<div dir="ltr" style="text-align: left;" trbidi="on">
In this post we will talk about Salesforce naming conventions best practices and how to write a <a href="http://www.apexhours.com/clean-code-in-salesforce/">clean code</a>. Salesforce naming convention is a rule to follow as you decide what to name your identifiers like class, variable, constant, method, etc. But, it is not forced to follow. So, it is known as convention not rule. Naming conventions make the application easier to read and maintain.<br />
<br />
A well formatted code increases readability, understanding and ultimately
maintainability of the code base.<br />
<br />
Before staring with naming convention lets talk about What is PascalCase, camelCase, SNAKE_CASE ?<br />
<ol>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>camelCase </b>: Each word in the middle of the respective phrase begins with a capital letter. for example apexHours <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
String <b>firstName</b>;</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>PascalCase</b>: It is same like Camel Case where first letter always is capitalized. for example ApexHours<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
Class <b>UserController</b>{ }</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>kebab-case</b>: Respective phrase will be transferred to all lowercase with hyphen(-) separating words. for example apex-hours<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
<c-hello-world-form></c-hello-world-form></div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>SNAKE_CASE</b>: Each word should be in capital with _ like . APEX_HOURS<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
private static final Integer MY_INT;</div>
</li>
</ol>
<br />
<br />
<h3>
<b><span style="mso-fareast-font-family: "Times New Roman";">Use Post Fix / Suffix:</span></b><span style="mso-fareast-font-family: "Times New Roman";"></span></h3>
Consistent file naming helps keep component easy to recognize and find. Here is some example of Postfix and Suffix we are using in our project from a long time.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: medium none; mso-border-alt: solid windowtext .75pt; mso-yfti-tbllook: 1184;">
<colgroup><col style="width: 164px;"></col><col style="width: 176px;"></col><col style="width: 195px;"></col></colgroup>
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; padding: 3.75pt;">
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="mso-fareast-font-family: "Times New Roman";">Functional Type</span></b></div>
</td>
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; padding: 3.75pt;">
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="mso-fareast-font-family: "Times New Roman";">Name Suffix</span></b></div>
</td>
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; padding: 3.75pt;">
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="mso-fareast-font-family: "Times New Roman";">Examples</span></b></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 1;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Trigger</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Trigger</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserTrigger</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 2;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Trigger
Handler</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">TriggerHandler</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserTriggerHandler</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 3;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Trigge Action </span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Trigger</span><span style="mso-fareast-font-family: "Times New Roman";">Action </span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserTrigger</span><span style="mso-fareast-font-family: "Times New Roman";">Action </span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 4;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">VF
Controller</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Controller</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserController</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 5;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">VF
Controller Extension</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Ext</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserExt</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 6;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Service
Class</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Service</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserService</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 7;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Model
/ Wrapper Class</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Wrapper</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserWrapper</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 8;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Web
Service (SOAP)</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Ws</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserToolsWs</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 9;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Web
Service (REST)</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Rest</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCreateRest</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 10;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Email
Service</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">EmlSvc</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCreateEmlSvc</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 11;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Asynchronous
(Future)</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Async</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCreateAsync</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 12;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Asynchronous
(Batch)</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Batch</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCreateBatch</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 13;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Scheduled
Apex</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Job</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCleanupJob</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 14;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Test
Class</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Test</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCreateTest</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 15;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Queueable
Apex</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Que</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserSyncingQue</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 16;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Visualforce
Page</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">-none-</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserClone</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 17;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Visualforce
Component</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Cmp</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">UserCloneCmp</span></div>
</td>
</tr>
<tr style="break-inside: avoid; mso-yfti-irow: 18; mso-yfti-lastrow: yes;">
<td style="border: 1pt solid; mso-border-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";">Lightning
Components</span></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<br /></div>
</td>
<td style="border-color: currentcolor; border-style: none solid solid none; border-width: medium 1pt 1pt medium; mso-border-alt: solid windowtext .75pt; mso-border-left-alt: solid windowtext .75pt; mso-border-top-alt: solid windowtext .75pt; padding: 3.75pt;">
<div class="MsoNormal">
<span style="mso-fareast-font-family: "Times New Roman";"><br /></span></div>
</td>
</tr>
</tbody></table>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:DoNotOptimizeForBrowser/>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--><br />
<br />
<br />
<br />
<h3>
<b><span style="mso-fareast-font-family: "Times New Roman";">APEX NAMING
CONVENTION :</span></b><span style="mso-fareast-font-family: "Times New Roman";"></span></h3>
<ol style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>Class Name </b>: Class names should be unique, beginning with an uppercase letter. It
should NOT contain underscores or spaces (except from the prefix and
suffix). Class names should be nouns in mixed cases, with first letter
of each interval word capitalized. For Example <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
ClassNamePOSTFIX</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>Variable Name </b>: Variables should be in mixed case with a lowercase first letter. Internal words start with capital letters. Variable names should be short and sweet and meaningful. Its should be <b>camelCase </b>like accountList<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
List<Account> accountList;</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>Method Name </b>: Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized. Whole words should be used and use of acronyms and abbreviations should be limited. Name should be <b>camelCase</b> like <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
showAccountDetail();</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>Constants </b>: The names of variables declared class constants should be all uppercase with words separated by underscores (“_”). All uppercase letters in this format : CONSTANT_NAME Example: <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
private static final String ACCOUNT_LIMIT ='10';</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>Trigger </b>: <ObjectName>Trigger. This should follow <a href="http://amitsalesforce.blogspot.com/2019/08/trigger-framework-salesforce.html">Salesforce Trigger Patterns</a> - One trigger per object<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
UserTrigger</div>
</li>
</ol>
<h3>
<br /></h3>
<h3 style="text-align: left;">
Visualforce Pages<br />
</h3>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
This should PascalCase, No underscores or spaces and use whole words, limit acronym or abbreviation like below.<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /></div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
AccountClone</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br />
</div>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:DoNotOptimizeForBrowser/>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--><br />
<h3 style="text-align: left;">
<b>Lightning Web Components <a href="http://amitsalesforce.blogspot.com/2020/04/lightning-web-components-naming-Convention.html">Naming Convention</a></b></h3>
<br />
<div style="text-align: left;">
Please check <a href="http://amitsalesforce.blogspot.com/2020/04/lightning-web-components-naming-Convention.html">this</a> post to leanr about <a href="http://www.apexhours.com/lightning-web-components/">LWC</a> naming Convention.</div>
<h3>
<b><span style="mso-fareast-font-family: "Times New Roman";"></span></b><span style="mso-fareast-font-family: "Times New Roman";"></span></h3>
<ol>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>Html File </b>: Use camel case to name your component and use kebab-case to reference a component in the markup. For Example <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
<b>helloWorld</b>.html</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>JavaScript File </b>:
Java Script Class name should be in PascalCase like below example <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
export default class <b>HelloWorld</b> extends LightningElement{<br />}</div>
</li>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b>CSS File </b>:
Methods should be verbs, in mixed case with the first letter lowercase,
with the first letter of each internal word capitalized. Whole words
should be used and use of acronyms and abbreviations should be limited.
Name should be <b>camelCase</b> like <br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
showAccountDetail();</div>
</li>
</ol>
<h2>
</h2>
<h2>
</h2>
<h2>
<b><span style="mso-fareast-font-family: "Times New Roman";"></span></b></h2>
<h3 style="text-align: left;">
<span style="mso-fareast-font-family: "Times New Roman";">CSS Class Naming Standards</span></h3>
<div style="text-align: left;">
<span style="mso-fareast-font-family: "Times New Roman";"></span></div>
<ul style="text-align: left;">
<li><span style="mso-fareast-font-family: "Times New Roman";">CSS classes should be named based on the component that is being addressed</span></li>
<li><span style="mso-fareast-font-family: "Times New Roman";">Any name that is longer than one word, needs to be in this format : class-name</span></li>
<li><span style="mso-fareast-font-family: "Times New Roman";">Multi word name should be separated by a " - "</span></li>
</ul>
<br />
<h3 style="text-align: left;">
<br /></h3>
<h3 style="text-align: left;">
Lightning Component</h3>
<div style="text-align: left;">
Lightning component names must be unique. They should begin with a lowercase letter. All components should end with the suffix “Cmp”. like <b></b></div>
<div style="text-align: left;">
<b><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /></b></div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
userCardCmp (Initial lower case letter and suffixed with “Cmp” ) </div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Lightning Events</h3>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Lightning event names must be unique. They should begin with a lowercase letter. All events should end with the suffix “Evt” . like </div>
<div style="text-align: left;">
<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /></div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: "arial", "tahoma", "helvetica", "freesans", sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
userEvt (Initial lowercase letter and suffixed with “Evt” )</div>
<h2>
</h2>
<div style="text-align: left;">
<b>Check below recording to learn about how to write clean code in Salesforce.</b></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/wQjsneX5XbQ/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/wQjsneX5XbQ?feature=player_embedded" width="320"></iframe></div>
<h3 style="text-align: left;">
<br /></h3>
<h3 style="text-align: left;">
<br /></h3>
<br />
Further learning<br />
<ul style="text-align: left;">
<li><a href="https://github.com/cfpb/salesforce-docs/blob/master/_pages/Salesforce-Naming-Conventions.md">https://github.com/cfpb/salesforce-docs/blob/master/_pages/Salesforce-Naming-Conventions.md</a> </li>
<li><a href="https://quip.com/MW5cAPVwat8k#JCIACA8Q963">https://quip.com/MW5cAPVwat8k#JCIACA8Q963</a></li>
</ul>
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com1tag:blogger.com,1999:blog-4216096443336193383.post-53328942515138342212020-06-16T04:57:00.000+05:302020-06-16T04:57:52.215+05:30Navigation Service in Lightning Web Components | Mixin<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ3Y0Z1mik4EwRwmKkLdgpbx4BAPiZX2OWEdnK-2ITOWN2_45RY8TCPF1nroxzduhpS3GtAVNNeQehvB4L28jpdDd3uGtv0V_ACRel6x6Vok37JPx1SbmFvq8L11TJPu-hn6MANJuYzHQ/s1591/Navigation+Service+In+Lightning+Web+Components.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="888" data-original-width="1591" height="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ3Y0Z1mik4EwRwmKkLdgpbx4BAPiZX2OWEdnK-2ITOWN2_45RY8TCPF1nroxzduhpS3GtAVNNeQehvB4L28jpdDd3uGtv0V_ACRel6x6Vok37JPx1SbmFvq8L11TJPu-hn6MANJuYzHQ/w640-h357/Navigation+Service+In+Lightning+Web+Components.PNG" width="640" /></a></div><div></div><div><br /></div><div>The Lightning navigation service allows you to navigate in Lightning
Experience, Lightning Communities and the Salesforce app. To generate a
URL or navigate to a page reference, use the lightning-navigation
service wire adapters and functions. <br /></div><div><br /></div><div>A <a href="https://developer.salesforce.com/docs/component-library/documentation/lwc/reference_page_reference_type.html" rel="nofollow" target=""><code>PageReference</code></a> is a JavaScript object that describes the page type, its attributes, and the <a href="https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_navigate" rel="nofollow">state</a> of the page.</div><div><br /></div><div>Step 1) Import lightning/navigation</div><div></div><div style="text-align: left;"><pre>import { NavigationMixin } from 'lightning/navigation';</pre></div><div></div><div></div><div></div><div><br /></div><div>Step 2) Apply the NavigationMixin function to your component’s base class.</div><div><br /></div><div style="text-align: left;"><pre>export default class MyCustomElement extends NavigationMixin(LightningElement) {</pre><pre>}</pre></div><div><br /></div><div>Step 3) Call the navigation service’s [NavigationMixin.Navigate] function to
dispatch the navigation request and open the New Course Delivery modal
dialog.</div><div><br /></div><div style="text-align: left;"><pre>onAddNewDelivery() {</pre><pre> this[NavigationMixin.Navigate]({</pre><pre> type: 'standard__objectPage',</pre><pre> attributes: {</pre><pre> objectApiName: 'Student__c',</pre><pre> actionName: 'new'</pre><pre> }</pre><pre> });</pre><pre> }</pre></div><div><br /></div><div><h2 aria-autocomplete="list" aria-label="Write heading…" aria-multiline="true" class="editor-rich-text__tinymce mce-content-body" contenteditable="true" data-is-placeholder-visible="false" id="mce_5" role="textbox" style="text-align: left;"></h2><h2 aria-autocomplete="list" aria-label="Write heading…" aria-multiline="true" class="editor-rich-text__tinymce mce-content-body" contenteditable="true" data-is-placeholder-visible="false" id="mce_5" role="textbox" style="text-align: left;">What is a Mixin?</h2><div>A mixin lets us add functionality to a class without extending it.
Useful when a class already extends a parent class, because a class can
only extend a single parent.</div><div><br /></div><div><br /></div><div>Check this recording after 1st<a href="https://www.youtube.com/watch?v=ANsfMZkguMA&t=3600s"> hours</a>.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="379" src="https://www.youtube.com/embed/ANsfMZkguMA" width="484" youtube-src-id="ANsfMZkguMA"></iframe></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div></div>Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-6886926150831635112020-06-01T18:48:00.000+05:302020-06-01T18:48:00.006+05:30Google chrome extensions for Salesforce<div dir="ltr" style="text-align: left;" trbidi="on">
There are lots of other awesome Salesforce Google chrome extensions are available in
market. But in this post we will talk about above 9 top google chrome
extension for Salesforce.<br />
<ol style="text-align: left;">
<li><strong><a href="https://chrome.google.com/webstore/detail/organizer-for-salesforce/lojdmgdchjcfnmkmodggbaafecagllnh?hl=en">Salesforce Organizer </a></strong>: The ORGanizer Chrome Extension (BETA) lets you forget about your Salesforce.com username and passwords and help you to recognize Salesforce.com tabs on your browser. Its also have lots of other feature. Please check our recording for that.</li>
<li><strong><a href="https://chrome.google.com/webstore/detail/salesforce-advanced-code/lnkgcmpjkkkeffambkllliefdpjdklmi?hl=en">Advanced Code Searcher </a></strong>: Enables you to quickly search through your instances Apex classes, triggers, Visualforce pages and components. Its also provide Code Coverage Extract, ApexPMD report and This extension now allows you to lint the lightning code via the Lightning Linter tab.</li>
<li><a href="https://chrome.google.com/webstore/detail/forcecom-logins/ldjbglicecgnpkpdhpbogkednmmbebec?hl=en"><strong>Force.com Login</strong></a>: Helps you manage Salesforce login credentials and lets you login with 1 click.</li>
<li><a href="https://chrome.google.com/webstore/detail/salesforce-api-fieldnames/oghajcjpbolpfoikoccffglngkphjgbo"><strong>Salesforce API Name</strong></a>: Small extension to toggle between API field names and labels on salesforce detail pages</li>
<li><a href="https://chrome.google.com/webstore/detail/salesforce-colored-favico/peohlnebahcddpmfaplmilpkgbkkcdho"><strong>Salesforce Coloured favicons</strong></a>: Overrides the standard salesforce favicon with one colored based on the org. Also, displays a separate icon for sandbox instances </li>
<li><a href="https://chrome.google.com/webstore/detail/salesforce-devtools/ehgmhinnhggigkogkbhnbodhbfjgncjf"><strong>Salesforce DevTools </strong></a>: Powerful Salesforce developer tools, includes Query Editor, Fields definition, ERDs, Page Layout, and others </li>
<li> <a href="https://chrome.google.com/webstore/detail/apex-debugger/mpckkbblhbfngaininanfjpdfjhbncjo"><strong>Apex Debugger </strong></a>: Debug Salesforce apex code with ease, Improved debug logs for Salesforce</li>
<li><a href="https://chrome.google.com/webstore/detail/salesforce-navigator/ecjmdlggbilopfkkhggmgebbmbiklcdo"><strong>Salesforce Navigator </strong></a>: This extension helps you get to any salesforce page quickly. Just type in what you need to do </li>
<li><strong><a href="https://chrome.google.com/webstore/detail/salesforce-inspector/aodjmnfhjibkcdimpodiifdjnnncaafh">Salesforce Inspector </a></strong>: An extension to add a metadata layout on top of the standard Salesforce UI to improve the productivity and joy of Salesforce configuration, development, and integration work.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/bpdJ0zxR_k4/0.jpg" src="https://www.youtube.com/embed/bpdJ0zxR_k4?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
Which Google chrome extensions you like?<br />
<br />
Thanks </div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-87505504756376666612020-04-19T23:33:00.000+05:302020-04-23T18:39:22.149+05:30Platform Events in Salesforce <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Platform Event is based on Event-Driven Architecture which enable apps to communicate inside and outside of Salesforce. Platform events are based on the publish/subscribe model and work
directly with a message bus which handles the queue of incoming events
and processes listening for them. This is built in real time integration patterns in the Salesforce Platform which helps to reduce point-to-point integration<br />
<br />
Here is some terminology we should remember :-<br />
<ul style="text-align: left;">
<li><b>Event </b>: A change in state that is meaningful in a business process. </li>
<li><b>Event message / </b><b>Notification </b>: A message that contains data about the event.</li>
<li><b>Event producer </b>: The publisher of an event message over a channel.</li>
<li><b>Channel </b>: A conduit in which an event producer transmits a message. Event consumers subscribe to the channel to receive messages. Also referred to as event bus in Salesforce.</li>
<li><b>Event consumer </b>: A subscriber to a channel that receives messages from the channel.</li>
</ul>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Understanding of Platform Event</h3>
<ul style="text-align: left;">
<li>SObject like Salesforce Entity</li>
<ul>
<li>Suffixed with __e</li>
<li>ReplayId fir replaying specific event</li>
<li>Only Checkbox, Date, Date/Time , Number , Text and Text Area field available. </li>
</ul>
<li>Pub / Sub based communication </li>
<ul>
<li>No Polling required.</li>
</ul>
<li>Heterogeneous playloads</li>
<ul>
<li>Define events with different playloads</li>
</ul>
</ul>
<div style="text-align: left;">
</div>
<h3 style="text-align: left;">
Difference between SObject and Platform Events </h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
</div>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; mso-yfti-tbllook: 1536; width: 704px;">
<colgroup><col span="2" style="mso-width-source: userset; width: 211pt;" width="352"></col>
</colgroup><tbody>
<tr>
<td class="oa1" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">SObjects</span><span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">__c</span></div>
</td>
<td class="oa1" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Platform_Events__e</span></div>
</td>
</tr>
<tr>
<td class="oa2" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">DMLs
(Insert, Update, Delete)</span></div>
</td>
<td class="oa3" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Publish
(Insert only)</span></div>
</td>
</tr>
<tr>
<td class="oa2" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">SOQL</span></div>
</td>
<td class="oa3" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Streaming
API</span></div>
</td>
</tr>
<tr>
<td class="oa2" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Triggers</span></div>
</td>
<td class="oa3" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Subscribers</span></div>
</td>
</tr>
<tr>
<td class="oa2" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Parallel
context execution</span></div>
</td>
<td class="oa3" style="width: 211pt;" width="352"><div style="direction: ltr; language: en-US; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; text-align: left; text-indent: 0in; unicode-bidi: embed;">
<span style="color: black; font-family: "arial"; font-size: 10.0pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Guaranteed
order of execution</span></div>
</td>
</tr>
</tbody></table>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h3 style="text-align: left;">
Considerations :-</h3>
<ol style="text-align: left;">
<li>Platform event is appended with__e suffix for API name of the event.</li>
<li>You can not query Platform events through SOQL or SOSL.</li>
<li>You can not use Platform in reports, list views, and search. Platform events don’t have an associated tab</li>
<li>Published platform events can’t be rolled back.</li>
<li>All platform event fields are read-only by default</li>
<li>Only after insert Triggers Are Supported</li>
<li>You can access platform events both through API and declaratively</li>
<li>You can control platform events though Profiles and permissions</li>
</ol>
</div>
<h3 style="text-align: left;">
Publishing / Subscribing Platform Events</h3>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtkPswaxDLN_2t5xOc5qjUswD-90e_yvlwZfB2Vpz36NjjEktunxhC_jELVDtxqY2vCoV04g9bMmPuQy9wZ7Ho1aME3_VtgU9zI8dHGpoBohYi82Bf_eLGDftyL7iJr9-P9mMlhicwqsQ/s1600/Publish+and+Subscribing+Platform+Event.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="461" data-original-width="939" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtkPswaxDLN_2t5xOc5qjUswD-90e_yvlwZfB2Vpz36NjjEktunxhC_jELVDtxqY2vCoV04g9bMmPuQy9wZ7Ho1aME3_VtgU9zI8dHGpoBohYi82Bf_eLGDftyL7iJr9-P9mMlhicwqsQ/s640/Publish+and+Subscribing+Platform+Event.PNG" width="640" /></a></div>
<div style="text-align: left;">
<br />
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Publish Platform Events :</h3>
</div>
<br />
We can publish the platform events in 3 ways:<br />
<ol style="text-align: left;">
<li>Publish Events Messaging using APEX.<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
List<Order_Shipping__e> orderShippingList = new List<Order_Shipping__e>();<br />
Order_Shipping__e orderShipping = new Order_Shipping__e( Order_Number__c='12345', status__c=1 );<br />
orderShippingList.add(orderShipping);<br />
<br />
List<Database.SaveResult> results = <b>EventBus.publish</b>(newsEventList);<br />
<br />
for (Database.SaveResult sr : results) {<br />
if (sr.isSuccess()) {<br />
System.debug('Successfully published event.');<br />
} else {<br />
for(Database.Error err : sr.getErrors()) {<br />
System.debug('Error returned: ' + err.getStatusCode() );<br />
}<br />
}<br />
}<span style="color: blue;"><span style="font-size: medium;"></span></span></div>
</li>
<li>Publish Events Messaging using Declarative tools </li>
<ol>
<li>Process Builder </li>
<li>Cloud Flow Designer Tool / Visual Work flow</li>
</ol>
<li>Publish Events Messaging using Salesforce API from external app.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguywTbnYu8y44hf04A7lwI40uE5fYGt1jRKl4P4tj5rDyZf-wcxGoKspwmfGHESDuwoMj-Y64W40T4NYpIf1Qkl30gqe3fCNLhqfilkjhK6-hMi8gz1442Bk03JXojKGbRyatxkR4ksT8/s1600/Platform+event+by+REST+API.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="322" data-original-width="992" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguywTbnYu8y44hf04A7lwI40uE5fYGt1jRKl4P4tj5rDyZf-wcxGoKspwmfGHESDuwoMj-Y64W40T4NYpIf1Qkl30gqe3fCNLhqfilkjhK6-hMi8gz1442Bk03JXojKGbRyatxkR4ksT8/s640/Platform+event+by+REST+API.PNG" width="640" /></a></div>
</li>
</ol>
<h3 style="text-align: left;">
Subscribing Platform Events :</h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
We can subscribe the platform events with following ways :</div>
<ol style="text-align: left;">
<li><b>Apex Trigger </b>: Write an “<b>after insert</b>” Apex trigger on the event object to subscribe to incoming events.Triggers receive event notifications from various sources—whether they’re published through Apex or APIs.<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
Trigger OrderShippingTrigger on Order_Shipping__e (after Insert) {<br />
<br />
}</div>
</li>
<li>Subscrbe to platform event notification in Lightning components</li>
<ol>
<li><b>Lightning web components </b>: Use the empApi methods in your Lightning web component, import the methods from the lightning/empApi module as follows<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
import { subscribe, unsubscribe, onError, setDebugFlag, isEmpEnabled } <br />
from 'lightning/empApi';</div>
</li>
<li>Subscibe in an <b>Aura Component </b>: Use the empApi methods in your Aura component, add the lightning:empApi component inside your custom component and assign an aura:id attribute to it<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; margin-bottom: 0.714286em; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; word-break: break-all; word-spacing: 0px;">
<lightning:empApi aura:id="empApi"/></div>
</li>
</ol>
<li>In an external app, you subscribe to events using CometD as well.</li>
<li>Flow and process builder. Check <a href="https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_process.htm">this </a>post.</li>
</ol>
Please check below two <a href="http://apexhours.com/">Apex Hours </a>sessions to learn more about platform event.<br />
<ol style="text-align: left;">
<li><a href="https://www.youtube.com/watch?v=pjFERotMm7o&t=78s">Platform Event basics</a></li>
<li><a href="https://www.youtube.com/watch?v=EUUpgz-_x34&t=780s">Overcome Salesforce Governor Limits Using Platform Events</a></li>
</ol>
<br />
<br />
<h3 style="text-align: left;">
Further Learning</h3>
<ul style="text-align: left;">
<li><a href="https://trailhead.salesforce.com/en/content/learn/modules/platform_events_basics/platform_events_architecture">Platform Events Basics</a></li>
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_intro.htm">Platform Event Developer Guide</a></li>
</ul>
<br />
<br />
Thanks<br />
Amit Chaudhary</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com4tag:blogger.com,1999:blog-4216096443336193383.post-85082538632542649622020-04-02T00:40:00.000+05:302020-04-02T00:40:21.940+05:30Lightning Web Components Naming Convention<div dir="ltr" style="text-align: left;" trbidi="on">
In this post we will talk about Lightning Web Components Naming Convention rules. We will also talk about example of PascalCase, camelCase or kebab-case and how those naming convention rules works in LWC.<br />
<br />
<h2 style="text-align: left;">
<span style="font-size: large;">Components Bundles</span></h2>
Lightning web component bundles include all below files by default. Its also have some Optional component like CSS, SVG Icon. <br />
<br /><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh0I2vWzBRihniXR-Wu-guZ3j7yeEvkS3OAG0R8nZx4gm4aBcVyOrkCwDIH6HcODTvLuW2HLVQjYuJBtPQ1FrZXIX5AB81kKmk5p0-eJxc5vnwnazTGPPY3AiD_-HCDLwTfAri4xoD9As/s1600/LWC+component+Bundle.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="364" data-original-width="364" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh0I2vWzBRihniXR-Wu-guZ3j7yeEvkS3OAG0R8nZx4gm4aBcVyOrkCwDIH6HcODTvLuW2HLVQjYuJBtPQ1FrZXIX5AB81kKmk5p0-eJxc5vnwnazTGPPY3AiD_-HCDLwTfAri4xoD9As/s320/LWC+component+Bundle.PNG" width="320" /></a></div>
<br />
Lets see what is the naming convention :<h2 style="text-align: left;">
<span style="font-size: x-large;">Naming Convention / Rules for Components Bundles</span></h2>
<ul style="text-align: left;"><span style="font-size: large;">
</span>
<li>Component name Must begin with a lowercase letter</li>
<li>Name must contain only alphanumeric or underscore characters</li>
<ul>
<li>Can’t contain a hyphen (dash)</li>
</ul>
<li>Must be unique in the namespace (<i>No other Aura or LWC can have this name</i>)</li>
<li>Can’t include whitespace</li>
<li>Can’t end with an underscore</li>
<li>Can’t contain two consecutive underscores</li>
<li>Folder and files names must have same “prefix name”.</li>
</ul>
<br />
<h3 style="text-align: left;">
<b>HTML File</b></h3>
<br />
Use camel case to name your component and use <b>kebab-case</b> to <b>reference a component </b>in the markup. For example<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkiu2YYZcQAoRyfAVC17-qs7bP1os866unO3A_aI5gtPyAe4jvSiZYamDug9GaKBHFFve6yVYKZqjFOr07hP0b-NkmaqgjTZlCfJXjqvrIrbzoTvC-kSXeAtecnakBF1d4ltwjAD-p5I0/s1600/LWC+Kebab-case.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="426" data-original-width="1038" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkiu2YYZcQAoRyfAVC17-qs7bP1os866unO3A_aI5gtPyAe4jvSiZYamDug9GaKBHFFve6yVYKZqjFOr07hP0b-NkmaqgjTZlCfJXjqvrIrbzoTvC-kSXeAtecnakBF1d4ltwjAD-p5I0/s640/LWC+Kebab-case.PNG" width="640" /></a></div>
<br />
<br />
<br />
<h3 style="text-align: left;">
<b>JavaScript File</b></h3>
<br />
Java Script <b>Class name </b>should be in <b>PascalCase </b>like below example :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN46kwlFjrsG-GKHFPY-u68ifhLWqHPprk6A_PE8DCDO7ksQ6hJD_C80jHfEpHhJm87uhKwzicUoeB1KSeKdOEvjWZWJ9Vgdvu-c6dGxzBM9OrUaoAcFVeJjDvCTIRLA90y2tIk-mPB1o/s1600/PascalCase+in+LWC.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="308" data-original-width="1074" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN46kwlFjrsG-GKHFPY-u68ifhLWqHPprk6A_PE8DCDO7ksQ6hJD_C80jHfEpHhJm87uhKwzicUoeB1KSeKdOEvjWZWJ9Vgdvu-c6dGxzBM9OrUaoAcFVeJjDvCTIRLA90y2tIk-mPB1o/s640/PascalCase+in+LWC.PNG" width="640" /></a></div>
<br />
<h3 style="text-align: left;">
<b>CSS File</b></h3>
<br />
<ul style="text-align: left;">
<li>Needs to be created in the component bundle</li>
<li>Has the same name as the component</li>
<li>Uses standard CSS syntax</li>
<li>Unlike Aura, no need for .THIS</li>
</ul>
<br />
<h3 style="text-align: left;">
What is the different between camelCase, PascalCase and kebab-case ?</h3>
<h3 style="text-align: left;">
</h3>
<br />
<a href="https://en.wikipedia.org/wiki/Camel_case"><b>camelCase </b></a>: Each word in the middle of the respective phrase begins with a capital letter. for example apexHours.<br /><b>PascalCase</b>: It is same like Camel Case where first letter always is capitalized. for example ApexHours.<b> </b><br />
<b>kebab-case</b>: Respective phrase will be transferred to all lowercase with hyphen(-) separating words. for example apex-hours.<br />
<br />
<table border="2" cellpadding="0" cellspacing="0" style="width: 524px;"><colgroup><col style="mso-width-alt: 3043; mso-width-source: userset; width: 64pt;" width="86"></col>
<col style="mso-width-alt: 4352; mso-width-source: userset; width: 92pt;" width="122"></col>
<col style="mso-width-alt: 4124; mso-width-source: userset; width: 87pt;" width="116"></col>
<col style="mso-width-alt: 7111; mso-width-source: userset; width: 150pt;" width="200"></col>
</colgroup><tbody>
<tr height="19" style="height: 14.4pt;">
<td class="xl67" height="19" style="height: 14.4pt; text-align: left; width: 64pt;" width="86"><b>Case Name</b></td>
<td class="xl67" style="border-left: medium none; text-align: left; width: 92pt;" width="122"><b>camelCase</b></td>
<td class="xl67" style="border-left: medium none; text-align: left; width: 87pt;" width="116"><b>PascalCase</b></td>
<td class="xl67" style="border-left: medium none; text-align: left; width: 150pt;" width="200"><b>kebab-case</b></td>
</tr>
<tr height="19" style="height: 14.4pt;">
<td class="xl65" height="19" style="border-top: medium none; height: 14.4pt; text-align: left;"><b>Example</b></td>
<td class="xl65" style="border-left: medium none; border-top: medium none; text-align: left;">helloWorld</td>
<td class="xl65" style="border-left: medium none; border-top: medium none; text-align: left;">HelloWorld</td>
<td class="xl65" style="border-left: medium none; border-top: medium none; text-align: left;">hello-world</td>
</tr>
<tr height="58" style="height: 43.2pt;">
<td class="xl65" height="58" style="border-top: medium none; height: 43.2pt; text-align: left;"><b>Where to use</b></td>
<td class="xl66" style="border-left: medium none; border-top: medium none; text-align: left; width: 92pt;" width="122">Folder<br />
File Names<br />
Property name in JS</td>
<td class="xl65" style="border-left: medium none; border-top: medium none; text-align: left;">Class in Java Script</td>
<td class="xl66" style="border-left: medium none; border-top: medium none; text-align: left; width: 150pt;" width="200">Component
reference in markup<br />
HTML attribure name</td>
</tr>
</tbody></table>
<br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> </span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> </span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Please check below post on Lightning Web Components:-</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<ol>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html" style="color: #6699cc; text-decoration: none;" target="_blank"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Lightning Web Components ( LWC ) in Salesforce with Non-Scratch Org</span></a></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2018/12/Invoke-Apex-Controller-from-Lightning-Web-Component.html" style="color: #33aaff; text-decoration: underline;" target="_blank"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Invoke Apex Controller from Lightning Web Component | Lightning Web Component inside Another LWC</span></a></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://amitsalesforce.blogspot.com/2019/01/design-attributes-in-lightning-web-components-css-svg.html" style="color: #6699cc; text-decoration: none;" target="_blank">Design attributes in Lightning Web Components | CSS and SVG Files | Lightning Web Components | targetConfigs</a></span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://amitsalesforce.blogspot.com/2019/01/how-to-get-current-user-id-in-lightning-web-components.html" style="color: #6699cc; text-decoration: none;" target="_blank">How to get current user id in lightning web component | Access logged in user ID in LWC </a></span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://amitsalesforce.blogspot.com/2019/01/toast-notification-in-lightning-web-components.html" style="color: #6699cc; text-decoration: none;" target="_blank">Toast Notification in Lightning Web Components | ShowToastEvent | (LWC)</a> </span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://amitsalesforce.blogspot.com/2019/03/lightning-web-components-best-practices.html" style="color: #6699cc; text-decoration: none;" target="_blank">Lightning Web Components Best practices </a></span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://amitsalesforce.blogspot.com/2019/07/events-in-lightning-web-components-lwc.html" style="color: #6699cc; text-decoration: none;" target="_blank">Events in Lightning web components (LWC) | Communicate with Events</a></span></span></span></span></u></b></li>
<b><u><span style="color: black;"></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2019/10/lightning-datatable-in-lightning-web-component.html" style="color: #6699cc; text-decoration: none;" target="_blank"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Lightning datatable In Lightning Web Components | lightning datatable inline edit</span></span></a></span></span></u></b></li>
<b><u><span style="color: black;"></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><span style="color: blue;"><b><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><u><span style="color: black;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2019/10/lightning-message-service-lms.html" style="color: #6699cc; text-decoration: none;" target="_blank">Lightning Message Service (LMS) | MessageChannel</a></span></span></u></span><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /></span></b></span></li>
</ol>
</div>
<br />
Thanks.<br />
Amit Chaudhary</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-24655159964305191892020-03-23T02:52:00.001+05:302020-03-23T02:52:19.066+05:30Salesforce Developer Training Free<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzVyywN1aoEXDxj2WkWEQhl-BCVum6vzTg8LcU63obaday1KeGdStWC9Vz_BzZi2TnNYwjANt-w2Rdzyu43Owb2dxTIhBTmepM4fWbqc-FVj8fVN7znb8-DcLsRtQAQLtSlaZPPLfk3YQ/s1600/Salesforce+Developer+Training.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="812" data-original-width="1470" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzVyywN1aoEXDxj2WkWEQhl-BCVum6vzTg8LcU63obaday1KeGdStWC9Vz_BzZi2TnNYwjANt-w2Rdzyu43Owb2dxTIhBTmepM4fWbqc-FVj8fVN7znb8-DcLsRtQAQLtSlaZPPLfk3YQ/s640/Salesforce+Developer+Training.PNG" width="640" /></a></div>
Want to become a Salesforce Developer ? Here is Free Salesforce Training for beginners. We are glad that we did one step by step Salesforce developer training for beginners and <a href="https://www.youtube.com/playlist?list=PLaGX-30v1lh1e8roeCUumUEel5ukdPubj">recorded</a>. More then <a href="https://twitter.com/amit_sfdc/status/1232830546402738176">2400</a> student registered in this <a href="http://www.apexhours.com/apex-hours-for-students-developer-program/">ApexHours</a> Training and learned apex across the world.<br />
<br />
Salesforce Developer are one of the best paid resources in the market. But there is no way to become a good Salesforce developer without being a good Salesforce admin. If you are new then check this <a href="http://amitsalesforce.blogspot.com/2019/12/salesforce-admin-training-becoming.html">Salesforce Admin training</a>.<br />
<br />
<h2 style="text-align: left;">
<span style="font-size: large;">Salesforce Developer Training</span></h2>
<div style="text-align: left;">
We covered the follow topic in that Developer training and good news is that all session are recorded and uploaded on YouTube. Please check below post for Recording, PPT, Trailhead module and further learning details.</div>
<ol style="text-align: left;">
<li><a href="http://www.apexhours.com/introduction-to-apex/">Introduction to Apex Part 1</a></li>
<li><a href="http://www.apexhours.com/oop-and-collection-in-apex/">Introduction to Apex Part 2</a></li>
<li><a href="http://www.apexhours.com/demystifying-developer-tools-in-salesforce/">Tools for Development & Debugging Apex</a></li>
<li><a href="http://www.apexhours.com/soql-sosl-dml-in-salesforce/">Querying & Manipulating Salesforce Data</a></li>
<li><a href="http://www.apexhours.com/demystifying-apex-triggers/">Writing Apex Triggers</a></li>
<li><a href="http://www.apexhours.com/unit-testing-in-apex/">Writing </a><a href="https://www.blogger.com/null">Unit Tests in Apex</a></li>
<li><a href="http://www.apexhours.com/asynchronous-processing-in-apex/">Asynchronous Processing in Apex</a></li>
<li><a href="http://www.apexhours.com/integrating-with-salesforce/">Integrating with Salesforce</a></li>
<li><a href="http://www.apexhours.com/integrating-with-salesforce-part-2/">Integrating with Salesforce</a></li>
<li><a href="http://www.apexhours.com/introduction-to-visualforce/">Building Custom User Interfaces using Visualforce</a></li>
<li><a href="http://www.apexhours.com/introduction-to-aura/">Custom User Interfaces using AURA</a></li>
<li><a href="http://www.apexhours.com/lightning-web-components-lwc-part1/">Building Custom User Interfaces using LwC – Part 1</a></li>
<li><a href="http://www.apexhours.com/building-custom-user-interfaces-using-lightning-web-components/">Building Custom User Interfaces using LwC – Part 2</a></li>
</ol>
<br />
Our Team spend lots of time to create this free course. So Please like the recording and subscribe the ApexHours YouTube Channel.<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 1: Introduction to Apex</span></h3>
<br />
In this session we covered What is apex, Data Type of Apex, Variable in Apex, Loops, Conditional Statements and Collection in Apex. Here is agenda of session. Check <a href="http://www.apexhours.com/introduction-to-apex/">this</a> post for PPT and further learning link.<br />
<ol style="text-align: left;">
<li>Declarative Vs Programmatic Approach of Development</li>
<li>Datatypes in Apex</li>
<li>Operators in Apex</li>
<li>System.Debug()</li>
<li>Familiarizing to Dev Tools – VS Code, Anonymous Block</li>
<li>Q & A</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/68X85SxAU1g/0.jpg" src="https://www.youtube.com/embed/68X85SxAU1g?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;"><span style="font-size: x-large;">Day 2: Introduction to Apex Part 2</span></span></h3>
<br />
In this session we covered Introduction to Class, Method, Static keywords and OOPs Concept in Apex. Here is agenda of session. Check <a href="http://www.apexhours.com/oop-and-collection-in-apex/">this post </a>for PPT and further learning link.<br />
<ol style="text-align: left;">
<li>Anatomy of Class</li>
<li>Methods</li>
<li>Static Vs Instance methods</li>
<li>Pass by Value Vs Reference</li>
<li>Introduction to Object Oriented Programming (OOP)</li>
<ol>
<li>Extending a Class</li>
<li>Interfaces</li>
</ol>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/TCxOlvxT8l4/0.jpg" src="https://www.youtube.com/embed/TCxOlvxT8l4?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 3: Demystifying Developer Tools</span></h3>
<br />
In this session we covered Developer tools available for Salesforce like VsCode, Developer console and Workbench. Please check <a href="http://www.apexhours.com/demystifying-developer-tools-in-salesforce/">this post </a>for PPT and further learning.<br />
<ol style="text-align: left;">
<li>Debugging Code in Salesforce</li>
<li>Introduction to Integrated Developer Environment (IDE)</li>
<li>Capabilities of various IDEs</li>
<li>Demo</li>
<li>Q & A</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/fpKZZ3kT-iU/0.jpg" src="https://www.youtube.com/embed/fpKZZ3kT-iU?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 4: Querying & Manipulating Salesforce Data</span></h3>
<br />
This session was a big session we divide the same into two part. Please check <a href="http://www.apexhours.com/soql-sosl-dml-in-salesforce/">this post </a>PPT and further learning link.<br />
<h3 style="text-align: left;">
Basic of SOQL and SOSL in Salesforce | Query Plan </h3>
All developer and admin should know the power of SOQL. In this session we covered the all below topic.<br />
<ol style="text-align: left;">
<li>What is SOQL</li>
<li>Basics of SOQL</li>
<li>Relationship Queries</li>
<li>SOQL in Apex, Querying Records in Batches by Using SOQL for Loops</li>
<li>Introduction to SOSL</li>
<li>Using the right tool for the job SOQL Vs SOSL</li>
<li>Writing optimal queries – Query Plan</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/N4_UtmnXPeI/0.jpg" src="https://www.youtube.com/embed/N4_UtmnXPeI?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
Data Manipulation and Error Handling in Salesforce | DML</h3>
Here is agenda of session<br />
<ol style="text-align: left;">
<li>Data Manipulation </li>
<li>Insert Vs Database Insert </li>
<li>Error Handling in Salesforce </li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/odt9r-7Wxw8/0.jpg" src="https://www.youtube.com/embed/odt9r-7Wxw8?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 5: Demystifying Apex Triggers</span></h3>
<br />
In this session we covered when should use the apex triggers. Please <a href="http://www.apexhours.com/demystifying-apex-triggers/">check this </a>post to PPT and further learning link.<br />
<ol style="text-align: left;">
<li>Order of Execution</li>
<li>When & How Triggers are invoked</li>
<li>Trigger Events</li>
<li>Avoiding Recursive Trigger Calls</li>
<li>Q & A</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/1ZioCoEsZfE/0.jpg" src="https://www.youtube.com/embed/1ZioCoEsZfE?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: large;">Salesforce trigger handler pattern </span></h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/uL7zs8wzEGY/0.jpg" src="https://www.youtube.com/embed/uL7zs8wzEGY?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
If you want to learn more about Other Trigger framework and Order of execution then please check below recording.<br />
<ol style="text-align: left;">
<li><a href="http://amitsalesforce.blogspot.com/2020/01/order-of-execution-in-salesforce.html">Order of Execution</a></li>
<li><a href="http://amitsalesforce.blogspot.com/2019/08/trigger-framework-salesforce.html">Apex trigger Framework</a>.</li>
</ol>
<h3 style="text-align: left;">
<span style="font-size: large;"> </span></h3>
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 6: Unit Testing in Apex</span></h3>
<br />
This was one of the big session so we divided the session in two part. Please check <a href="http://www.apexhours.com/unit-testing-in-apex/">this post </a>for PPT and all further learning link<br />
<h3 style="text-align: left;">
<span style="font-size: large;">Writing Test Classes in Salesforce</span></h3>
In this session we covered the basic of Test Classes.<br />
<ol style="text-align: left;">
<li>What are Unit tests</li>
<li>Why Unit tests are needed</li>
<li>What to Test</li>
<li><a href="http://amitsalesforce.blogspot.com/2015/05/testsetup-set-up-test-data-for-entire.html">TestSetup method in Test Class</a></li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ch1bo_OpEQM/0.jpg" src="https://www.youtube.com/embed/ch1bo_OpEQM?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: large;">Writing Effective Unit Test Classes</span>. </h3>
Here is list for topic which covered in this recording.<br />
<ol style="text-align: left;">
<li>Write effective Unit tests</li>
<li><a href="http://amitsalesforce.blogspot.com/2015/06/best-practice-for-test-classes-sample.html">Important thing to learn</a></li>
<li><a href="http://amitsalesforce.blogspot.com/2017/01/test-utility-classes-testdatafactory.html">TestDataFactory class Unit tests</a></li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/NC8XHpDY3OI/0.jpg" src="https://www.youtube.com/embed/NC8XHpDY3OI?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 7: Asynchronous Processing in Apex</span></h3>
<br />
<br />
Writing business logic in Apex that runs for a long duration is often a key ask by customers. In this episode we will learn about writing asynchronous process in Apex using Apex. Join us as you embark on this wonderful journey to become a champion Salesforce developer. Please <a href="http://www.apexhours.com/asynchronous-processing-in-apex/">check this </a>post for PPT and further learning.<br />
<br />
<ol style="text-align: left;">
<li>Avenues of writing asynchronous processes</li>
<li>Batch Processing</li>
<li>Writing Scheduled Cron Jobs</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/7rEM8qmaup0/0.jpg" src="https://www.youtube.com/embed/7rEM8qmaup0?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div style="text-align: left;">
<br /></div>
<br />
<ol style="text-align: left;">
<li>Future Methods</li>
<li>Queueable</li>
<li>Q & A</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/bXtFfFtXInI/0.jpg" src="https://www.youtube.com/embed/bXtFfFtXInI?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<span id="goog_1869606150"></span><span id="goog_1869606151"></span><br />
Please check this recording to learn more about Aysn Apex.<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 8: Integrating with Salesforce</span></h3>
<br />
Salesforce is a service first platform and it is often required to integrate Salesforce with external applications and services. In this episode we will learn about performing callouts to external services using Apex. Join us as you embark on this wonderful journey to become a champion Salesforce developer. Check <a href="http://www.apexhours.com/integrating-with-salesforce/">this post </a>for PPT and recording.<br />
<br />
<br />
<ol style="text-align: left;">
<li>Web Communication Fundamentals</li>
<li>Understanding REST Vs SOAP</li>
<li>Message Exchange Formats – XML & JSON</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/gQ5Qyf8nJlY/0.jpg" src="https://www.youtube.com/embed/gQ5Qyf8nJlY?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div style="text-align: left;">
<br /></div>
<ol style="text-align: left;">
<li>Basic of REST API</li>
<li>HTTP Methods</li>
<li>Performing Callouts to External Services</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/iENKtRTv4gM/0.jpg" src="https://www.youtube.com/embed/iENKtRTv4gM?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;"><span style="font-size: x-large;">Day 9: Rest API vs Soap API and Enterprise & Partner </span></span></h3>
<br />
In this session we covered standard and custom REST API and how SOAP API worked. We also talk about Enterprise and partner WSDL. Please check <a href="http://www.apexhours.com/integrating-with-salesforce-part-2/">this post </a>for PPT and further learning. <br />
<ol style="text-align: left;">
<li>HTTP Request & Response</li>
<li>Anatomy of a REST API CALL</li>
<li>Standard REST API</li>
<li>Custom REST API</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/q1VNODChvAo/0.jpg" src="https://www.youtube.com/embed/q1VNODChvAo?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<ol style="text-align: left;">
<li>SOAP API</li>
<li>SOAP Message</li>
<li>Enterprise vs Partner WSDL</li>
<li>SOAP vs REST</li>
<li>Salesforce Limits</li>
<li><a href="http://www.apexhours.com/salesforce-integration-pattern-best-practices/">Integration Patterns</a></li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Tiqnt-2U3r0/0.jpg" src="https://www.youtube.com/embed/Tiqnt-2U3r0?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 10: Introduction to Visualforce Page</span></h3>
<br />
In this session we talk about baisc of Visualforce page. Please check this <a href="http://www.apexhours.com/introduction-to-visualforce/">post for PPT</a>. Here is Agenda of session.<br /><ul style="text-align: left;">
<li>Introduction to Visualforce</li>
<li>MVP Pattern</li>
<li>Visualforce Constructs & Tags</li>
<li>Understanding Visualforce Controllers</li>
<ul>
<li>Standard Controllers</li>
<li>Custom Controller</li>
<li>Exptensions</li>
</ul>
<li>Capabilities & Considerations for Custom User Interfaces</li>
<li>Q & A</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/mdSNalJ9ptQ/0.jpg" src="https://www.youtube.com/embed/mdSNalJ9ptQ?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Day 11: Introduction to Lightning Components | AURA</span></h3>
<br />
In this session we talk about basic of lightning component and how to bulid custom UI with the help of AURA. Please check <a href="http://www.apexhours.com/introduction-to-aura/">this post </a>for PPT and further learning. <ol style="text-align: left;">
<li>Introduction to Lightning Aura Components</li>
<li>Anatomy of a Lightning Aura Component</li>
<li>Attributes and Expressions</li>
<li>Communication with Salesforce</li>
<li>Event in Aura</li>
<li>Debugging Aura Components</li>
<li>Styling UI with SLDS</li>
<li>Q & A</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Yz_IJzC6yfU/0.jpg" src="https://www.youtube.com/embed/Yz_IJzC6yfU?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;"><span style="font-size: x-large;">Day 12: Introduction to Lightning web components</span></span></h3>
<br />
In this session we covered all below topic. Please check <a href="http://www.apexhours.com/lightning-web-components-lwc-part1/">this post </a>to PPT and further learning link.<br />
<ol style="text-align: left;">
<li>Introduction to Lightning Web Components</li>
<li>Aura vs LWC</li>
<li>Anatomy of a Lightning Web Component</li>
<li>Lightning Playground</li>
<li>Create your first Lightning web components</li>
<li>Properties in LWC</li>
<li>Invoking Apex from LwC</li>
<li>Q & A</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/4ovwcfi7cHg/0.jpg" src="https://www.youtube.com/embed/4ovwcfi7cHg?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;"><span style="font-size: x-large;">Day 13: Event Handling and Navigation IN LWC</span></span></h3>
<br />
In this session we covered all below topic. Please check <a href="http://www.apexhours.com/building-custom-user-interfaces-using-lightning-web-components/">this </a>post for PPT.<br />
<br />
<ol style="text-align: left;">
<li> Managing Navigation in LwC</li>
<li>Working with Events</li>
<li>Accessing Salesforce Data</li>
<li>Using Custom Components in Lightning Experience</li>
<li>Q & A</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ANsfMZkguMA/0.jpg" src="https://www.youtube.com/embed/ANsfMZkguMA?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<br />
<br />
If this course helped then please like the recording and leave one comment for Speaker hard work.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Thanks<br />
Amit Chaudhary <br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com15tag:blogger.com,1999:blog-4216096443336193383.post-4567158122767446082020-03-15T03:46:00.002+05:302020-03-19T02:29:46.178+05:30World's First Salesforce Virtual Dreamin event<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://bit.ly/2TKFvcL"><img alt="https://bit.ly/2TKFvcL" border="0" data-original-height="300" data-original-width="1580" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7JkhH9ZFVn3JmXcBl1y0RGnyQ2pID18b1ilXl-gfB4oeUl4F8GZy31Z3cbcwTrMT_pEGwKQjtIggFbc96Lz1AVNTxdDdn00ghIgh0HYV6lcgaKsmLRa9fLMcdqjxHLODyoiTh1WSEYj0/s640/VirtualDreamin.jpeg" width="640" /></a></div>
<br />
We are glad to announce the world first Salesforce Virtual <a href="http://virtualdreamin.com/" target="_blank">Dreamin</a> after a great success of <a href="https://www.youtube.com/channel/UChTdRj6YfwqhR_WEFepkcJw" target="_blank">Apex Hours</a>, Automation Champion and <a href="http://pathtocode.com/" target="_blank">Path To Code</a>
virtual program. All these events got fantastic response from various
part of globe because it can be attended by anyone from anywhere.<br />
<br />
There are so many fabulous Salesforce dreamins happening around the globe however there are some people who either are remote, not in a big city or just unable to travel. That’s why the above advantages of Virtual events are so important. There is an event named <a href="http://virtualdreamin.com/">Virtual Dreamin</a> and nows the time for you to join in. Don’t miss this one of a kind event.<br />
<br />
<br />
<i><b>"Geographical location is not an obstacle anymore. Join Dreamin from anywhere on planet"</b></i><br />
<br />
<br />
<h2 style="text-align: left;">
<span style="font-size: large;"><i><b>5 Reasons Why Virtual Events Are The Future </b></i></span></h2>
<ol>
<li><b>Join from Anywhere</b> : A virtual event can overcome the limitations of brick and mortar events. You can connect with hundreds of people simultaneously. Whether you are at the grocery store or stuck in traffic. Just connect to the platform, settle in and meet people from all over the world.<div class="separator" style="clear: both; text-align: center;">
</div>
</li>
<li><b>No Need to Travel & its Safe </b>: No flight delays, security checks, or weather delays. If its virtual event, you can join from the comfort of your own home or office. All you need is an internet capable device with audio and visual capabilities and an internet connection. Check it out, Salesforce officially announced that its going virtual for <a href="https://www.salesforce.com/au/events/worldtour/syd20/overview/">Sydney world tour 2020</a> for safety concern.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiih7WDmxpqgF4dqSKMQFte3tHHZt0GSowvQtvvIy5Uii-WDGir64SqThnkkYTxqM3qgJALr6TsgmryiyFM1wVoooozyQfMJ3uvkCioRpOcGlwRbVtTcMiFqifSjs1dzLsHkbwPgbAylVY/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="790" data-original-width="1600" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiih7WDmxpqgF4dqSKMQFte3tHHZt0GSowvQtvvIy5Uii-WDGir64SqThnkkYTxqM3qgJALr6TsgmryiyFM1wVoooozyQfMJ3uvkCioRpOcGlwRbVtTcMiFqifSjs1dzLsHkbwPgbAylVY/s400/Capture.PNG" width="400" /></a></div>
</li>
<li><b>Easy on Budget</b> : How about no more waiting on your VISA to go through, flight and hotel costs or waiting on your reimbursement check. Virtual events remove that barrier and allows you the freedom to explore without having to worry about the cost.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSArkFrJxOZW8T-OCGwueWQihhKZO_U8Pa-01ZWIoaMjbxMHWxYsbBfkQr9LobC2HL4a5s38CAIarWi3Qk76s9Ayaw1RCskXTHyeDkJVPFGJG7D-8k57qx_hEmerd9v_f27keDPi8fbNU/s1600/Capture1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="893" data-original-width="1600" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSArkFrJxOZW8T-OCGwueWQihhKZO_U8Pa-01ZWIoaMjbxMHWxYsbBfkQr9LobC2HL4a5s38CAIarWi3Qk76s9Ayaw1RCskXTHyeDkJVPFGJG7D-8k57qx_hEmerd9v_f27keDPi8fbNU/s400/Capture1.PNG" width="400" /></a></div>
</li>
<li><b>More Outreach</b> : No more geographical barriers. Since you can join these events from anywhere, means you are going to reach more participants and speakers. Use social media platforms to increase visibility to promote your event to reach more users with the added benefit of saving money.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYXZpk-cDrylHxtNDObSwncP6y4AZUv2T9foIbTqOR43o9Rhdo1DocFl9PRsnBbbvWdfByRlGxFIgKSoKSn5xkUbHln6XWztE4F86Z3JMRt99-qgtjPKRQvrmMt30zSiabQji9RNoOnYc/s1600/Capture3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1020" data-original-width="1600" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYXZpk-cDrylHxtNDObSwncP6y4AZUv2T9foIbTqOR43o9Rhdo1DocFl9PRsnBbbvWdfByRlGxFIgKSoKSn5xkUbHln6XWztE4F86Z3JMRt99-qgtjPKRQvrmMt30zSiabQji9RNoOnYc/s400/Capture3.PNG" width="400" /></a></div>
</li>
<li><b>Quality Speakers</b> : There are highly talented and inspiring speakers out there and getting those speakers can be impacted by the logistics of travel, budget, and time. If you are aspiring speaker, this is your chance to step up and show the world how capable you are.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLwUjE9DwZi52Prmn1vBFhWee7fIdeLVlyXfXNpmwwZQaCdbF-M43QQ4afPVhwYerchIC922gHgF9lgEZiL1BVWNZcbtAVlzLCBXYkGYnB8ZRThwNg0aLkYGWoHbdV4HmYqTRnHts0WDI/s1600/Capture4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="650" data-original-width="1600" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLwUjE9DwZi52Prmn1vBFhWee7fIdeLVlyXfXNpmwwZQaCdbF-M43QQ4afPVhwYerchIC922gHgF9lgEZiL1BVWNZcbtAVlzLCBXYkGYnB8ZRThwNg0aLkYGWoHbdV4HmYqTRnHts0WDI/s400/Capture4.PNG" width="400" /></a></div>
</li>
</ol>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">3 Bonus reason to join Virtual Dreamin</span><span style="font-size: large;"><br /></span></span>
</h2>
<br />
<ol>
<li><b>Its Free</b> : Virtual Dreamin is free. <a href="https://bit.ly/2TKFvcL">Registration is now </a>open for the World's First Salesforce Virtual Dreamin event on May 16-17, 2020. Register here <a href="https://bit.ly/2TKFvcL">https://bit.ly/2TKFvcL</a></li>
<li><b>Its 24 Hours</b> : This event is 24 hours event means you can join this from Timezone of your country.</li>
<li><b>3 Tracks running at same time</b> : Three Track of sessions which include Admin, Devs & Architect. These tracks also includes Hands On Training (HoT), WIT and App Demo Jam. A <b><a href="http://virtualdreamin.com/speakers/">Certified Technical Architect (CTA)</a></b> is the pinnacle credential anyone can hold in Salesforce ecosystem. You can say, they are rare to find in Salesforce ecosystem like unicorns. However, we are grateful & honored as 5 CTA’s are taking time from their busy schedule and sharing knowledge with us.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://bit.ly/2TKFvcL"><img alt="https://bit.ly/2TKFvcL" border="0" data-original-height="1000" data-original-width="1000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0kqb35lcLPcHxRVsESi1sMtXDegZk7He6OaXlV82zR1vhQfWuEEkm9_aPYHS4JnUzwRTecy1Zrs2xqMzMi3svhXDt08xG93VGuOIzi6X2CwVUxnj0g_Z6AhpJqiQQBuL9eIJkLgIDIA/s320/WhatsApp+Image+2020-02-28+at+9.56.10+PM.jpeg" width="320" /><span id="goog_526885907"></span></a><span id="goog_526885908"></span></div>
<br />
<br />
<br />
<h1>
<a href="http://virtualdreamin.com/sponsorship-opportunity/">Why To Sponsor us</a></h1>
<b>Reach a Larger Global Audience</b><br />
Extend your reach to audiences across the globe without the associated costs of airfare and travel. Host a wide range of online events from conferences to product launches with features like:<br />
<ul>
<li>Registration capture </li>
<li>Support for international date/time formats</li>
</ul>
<br />
<b>Mobile-Friendly Virtual Events</b><br />
Whether your attendees are connecting with you on their phone or tablet, our platform supports all device and browser types.<br />
<br />
<br />
<br />
Thank<br />
Amit Chaudhary<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com2tag:blogger.com,1999:blog-4216096443336193383.post-34106554724755431352020-03-02T07:29:00.001+05:302020-03-02T07:29:06.339+05:30Case Merge | Combine Duplicate Cases | Spring 20 Release Notes<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Finally case merge feature is generally available from Sprint 20. Now agent can merge the duplicate cases like account and contacts. This functionality is not available in Classic. Even if you have added the button in standard button section, it will not appear on the page layout in Classic <br />
<br />
<br />
To use the case merge you need to follow below step<br />
<h3 style="text-align: left;">
1) Enable case merge</h3>
First of all you need to enable the merge case feature from Feature Setting->Service-> Case Merge. Like below image.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7xlSo3YeUOrgooiWv4g9RCjum3e89POH5pyp0LrnQ_8Wxxy1f9GT2y9DdH14utMVb2v_vz_SNakQZMQdSFP3rjPUqXUcdCsMs98N62OOiTVprfYSs1vx5u6IT9aEBvirNYLMbjC8IqiY/s1600/Case+Merge.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="689" data-original-width="1600" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7xlSo3YeUOrgooiWv4g9RCjum3e89POH5pyp0LrnQ_8Wxxy1f9GT2y9DdH14utMVb2v_vz_SNakQZMQdSFP3rjPUqXUcdCsMs98N62OOiTVprfYSs1vx5u6IT9aEBvirNYLMbjC8IqiY/s640/Case+Merge.PNG" width="640" /></a></div>
<br />
<h3 style="text-align: left;">
2) Add Button on case layout:</h3>
<br />
Once you have added case merge button on page Layout, You can check it by going to the record like below image <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6JwynkHC5LkuRb6J7Ccej27frc___wsEhNF9Dn-YaBw8pDK2jtfiZG-Y3QaB2x__7PvESCwc_LkewkViPuUVaEJJ-Hvz1nCq0NkWY1TqTjLtVG69UXW0PfL2Dv37v1BI0wBiRgLsP3fk/s1600/Case+merge+button.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="647" data-original-width="1549" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6JwynkHC5LkuRb6J7Ccej27frc___wsEhNF9Dn-YaBw8pDK2jtfiZG-Y3QaB2x__7PvESCwc_LkewkViPuUVaEJJ-Hvz1nCq0NkWY1TqTjLtVG69UXW0PfL2Dv37v1BI0wBiRgLsP3fk/s640/Case+merge+button.PNG" width="640" /></a></div>
<br />
<h3 style="text-align: left;">
3) Select duplicate records</h3>
Once you click on the Merge Cases action It will open a popup to select the cases to be Merge.<br />
You can select the 2 to 3 record at a time<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHQogEe3jT3d8ln-SMcSFfQjb2IF8yWxM6uirEnuv_yaOFZtYmRZsPjVN7nu8TDmR84WBNDToI_PPOiJZKmzzwOU4J7GyAS82qXQxjuMUWyfnpJg2UQ38f2GMwtM3ntrG2i2UGZdGP-PY/s1600/Case+merge+related+List.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="218" data-original-width="1600" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHQogEe3jT3d8ln-SMcSFfQjb2IF8yWxM6uirEnuv_yaOFZtYmRZsPjVN7nu8TDmR84WBNDToI_PPOiJZKmzzwOU4J7GyAS82qXQxjuMUWyfnpJg2UQ38f2GMwtM3ntrG2i2UGZdGP-PY/s640/Case+merge+related+List.PNG" width="640" /></a></div>
<h3>
<br /></h3>
<h3>
4) Merge Record</h3>
<br />
Once you have selected it, Click on next. It will give you option to select your master case and master case field values<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQLQBORa4vuMoVXbLL2NjplrLPZMgt2hJLjtO2_rPKN1LWcqDETks763OtBYs3IdrpIhE6yBxesefoPwTECKJnrZ0cbERZjBzhjwxM-Q0FNqfdMN4HO6p-ayL2usSpm9YYy8Aw30SaqkU/s1600/Case+Merge+Layout.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="897" data-original-width="1600" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQLQBORa4vuMoVXbLL2NjplrLPZMgt2hJLjtO2_rPKN1LWcqDETks763OtBYs3IdrpIhE6yBxesefoPwTECKJnrZ0cbERZjBzhjwxM-Q0FNqfdMN4HO6p-ayL2usSpm9YYy8Aw30SaqkU/s640/Case+Merge+Layout.PNG" width="640" /></a></div>
<br />
<br />
If your org chooses to delete merged cases, then only the master case is saved. The merged cases are soft deleted and are available in to the recycle bin for 15 days<br />
<br />
Learn more<br />
<br />
<a href="https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_cases_case_merge_ga.htm">https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_cases_case_merge_ga.htm</a><br />
<br />
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com7tag:blogger.com,1999:blog-4216096443336193383.post-44229302315508571692020-01-24T00:47:00.000+05:302020-01-24T00:50:35.843+05:30Enforce Security With the stripInaccessible Method<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh12Os8vyBOPW3y0ldya-17rv_dxaXJIo4yQpdKDEOtJmzEev7OEUeBXSqIEUfe7s5NUq8H4vvym0oC8a5XMfYLvY3Ut43dL0jOXArfTMNwFhYf_K8sk884mQIiymYAmHbTo-yaCJaCSM4/s1600/StripInaccessible.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="805" data-original-width="1462" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh12Os8vyBOPW3y0ldya-17rv_dxaXJIo4yQpdKDEOtJmzEev7OEUeBXSqIEUfe7s5NUq8H4vvym0oC8a5XMfYLvY3Ut43dL0jOXArfTMNwFhYf_K8sk884mQIiymYAmHbTo-yaCJaCSM4/s640/StripInaccessible.PNG" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
In this post we will talk about the new way to enforce the security in apex with stripInaccessible() method. From Winter 20, stripInaccessible() security feature for field-level data protection is available for beta in production. In winter 20 Salesforce extended the feature and added enum value UPSERTABLE to System.AccessType. <br />
<br />
stripInaccessible() is useful to strip the field that current user don't have access from query and sub-query. We can use it to remove inaccessible field from sObjects before DML operation to avoid exceptions. This method also provides the option an option to enforce the <b>Object level access </b>check. <br />
<br />
<b>Syntax :- </b><br />
<br />
<b>
</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<b>public static System.SObjectAccessDecision stripInaccessible(System.AccessType accessCheckType, <br /> List<SObject> sourceRecords, <br /> Boolean enforceRootObjectCRUD )</b><span style="color: blue;"><span style="font-size: large;"></span></span></div>
<ul style="text-align: left;">
<li><b><i>accessCheckType </i></b>: This parameter determines the type of field-level access check to be performed</li>
<li><i><b>sourceRecords </b></i>: A list of sObjects to be checked for fields that aren’t accessible in the context of the current user’s operation</li>
<li><i><b>enforceRootObjectCRUD </b></i>: Indicates whether an object-level access check is performed</li>
</ul>
<b> </b><span style="color: blue;"><span style="font-size: large;"> </span></span><br />
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Use Case 1: No access on Field</span></span></h2>
In this example, User don't have access on field called accountNumber on Account Object.<br />
<br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
List<Account> accounts =[SELECT Id, Name,AccountNumber<br />
FROM Account limit 2];<br />
<br />
// Strip fields that are not readable<br />
SObjectAccessDecision decision = Security.stripInaccessible(<br />
AccessType.READABLE,<br />
accounts);<br />
<br />
// Print stripped records<br />
for (Integer i = 0; i < accounts.size(); i++) {<br />
System.debug('Insecure record access: '+accounts[i]);<br />
System.debug('Secure record access: '+decision.getRecords()[i]);<br />
}<br />
<br />
// Print modified indexes<br />
System.debug('Records modified by stripInaccessible: '+decision.getModifiedIndexes());<br />
<br />
// Print removed fields<br />
System.debug('Fields removed by stripInaccessible: '+decision.getRemovedFields()); <b> </b></div>
In above example user dont have access on accountNumber field. After using the Security.scripInaccessible method we can simply strip out the same field. Which all field are removed we can check with "<b>getRemovedFields</b>" method. Here is output of above code.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFTA08SjhfgBs3BEf8fNKvXMDhXVw50IdZ-JrVkBbSH7gofdUpc0obdCt6zZ6k7wVCEe7K_EDNZoEuA72n7xrARrjyFnd39dts4oBkN7xbszToP-m-G34HFV1S6Mig4YyA1bsr4jqB7-Q/s1600/Field+Level+Security+with+stripInaccessible+1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="222" data-original-width="1043" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFTA08SjhfgBs3BEf8fNKvXMDhXVw50IdZ-JrVkBbSH7gofdUpc0obdCt6zZ6k7wVCEe7K_EDNZoEuA72n7xrARrjyFnd39dts4oBkN7xbszToP-m-G34HFV1S6Mig4YyA1bsr4jqB7-Q/s640/Field+Level+Security+with+stripInaccessible+1.PNG" width="640" /></a></div>
<br />
<br />
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Use Case 2: No access on sObject</span></span></h2>
Let see another example when user don't have access on object itself. For demo I simply removed the access from Account object. Then we got the below exception.<br />
<br />
<b>
</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<b> System.NoAccessException: No access to entity: Account</b></div>
<span style="color: blue;"><span style="color: black;">we have "</span></span><span style="color: blue;"><span style="color: black;"><i><b>enforceRootObjectCRUD</b></i>" optional parameter which is true by default we can set that as false to get null value.</span></span><br />
<br />
<br />
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Use Case 3: SubQuery.</span></span></h2>
What about if you are try to access field from subquery ?<br />
<b>
</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
List<Account> accountsWithContacts =<br />
[SELECT Name, AccountNumber,<br />
(SELECT LastName, Phone FROM Account.Contacts)<br />
FROM Account limit 2];<br />
<br />
// Strip fields that are not readable<br />
SObjectAccessDecision decision = Security.stripInaccessible(<br />
AccessType.READABLE,<br />
accountsWithContacts);<br />
<br />
// Print stripped records<br />
for (Integer i = 0; i < accountsWithContacts.size(); i++) <br />
{<br />
System.debug('Insecure record access: '+accountsWithContacts[i]);<br />
System.debug('Secure record access: '+decision.getRecords()[i]);<br />
}<br />
<br />
// Print modified indexes<br />
System.debug('Records modified by stripInaccessible: '+decision.getModifiedIndexes());<br />
<br />
// Print removed fields<br />
System.debug('Fields removed by stripInaccessible: '+decision.getRemovedFields());</div>
<div style="text-align: left;">
<span style="font-size: small;">This will remove the field on which user dont have access.</span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: small;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2WS1HkUR4QdqC2cu8V5eZgoWJH4Q_PwjaALRSTeOgr3xqdmpsYfuvAhDo7CrYRZuCkykiT4qFNqeE8YtvEsEc8kUtm973FThW7VxxFgmY_9IG_V6Zl-mKlih28XQP9zrs4GUoG6kTCy4/s1600/FLS.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="227" data-original-width="1242" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2WS1HkUR4QdqC2cu8V5eZgoWJH4Q_PwjaALRSTeOgr3xqdmpsYfuvAhDo7CrYRZuCkykiT4qFNqeE8YtvEsEc8kUtm973FThW7VxxFgmY_9IG_V6Zl-mKlih28XQP9zrs4GUoG6kTCy4/s640/FLS.PNG" width="640" /></a></span></div>
<span style="font-size: small;"> </span><br />
<div style="text-align: left;">
<br /></div>
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Use Case 4: DML.</span></span></h2>
<br />
What about if use dont have access on AccountNumber field and we will try to add value of AccountNumber by DML ?<br />
<br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
public static void testDML(){<br />
Account acc = new Account(Name='Test', AccountNumber ='TestRating');<br />
insert acc ;<br />
System.debug('---->'+acc ); <br />
} <b><br /></b></div>
This will insert the record with AccountNumber value in same user context even user dont have access on same field. How we can stop the same with Security.stripInaccessible. Let see<br />
<br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
public static void testDML()<br />
{ <br />
Account acc = new Account(Name='Test' ,AccountNumber ='Demo');<br />
System.debug('---->'+acc ); <br />
List<Account> lstAcc = new List<Account>();<br />
lstAcc.add(acc);<br />
<br />
SObjectAccessDecision securityDecision = Security.stripInaccessible(<br />
AccessType.CREATABLE,<br />
lstAcc );<br />
System.debug('---ecurityDecision.getRecords()->'+securityDecision.getRecords()); <br />
insert securityDecision.getRecords(); <br />
System.debug(securityDecision.getRemovedFields().get('Account')); <br />
} <b><br /></b></div>
here is output<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf4bRxYAUhx7FduS2bSwkczQYCO1CTw7StJ0TqIB-_KzSIsrrDBzXS8cutVxCLbTxYSR4Oq0mJUjUxnahYaLf5JZZlQlC6xDi20Z62c_lLABFUeWDsHdlE-l0g_TOBFWkeSBywpye5geo/s1600/DML+With+stripInaccessible.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="217" data-original-width="798" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf4bRxYAUhx7FduS2bSwkczQYCO1CTw7StJ0TqIB-_KzSIsrrDBzXS8cutVxCLbTxYSR4Oq0mJUjUxnahYaLf5JZZlQlC6xDi20Z62c_lLABFUeWDsHdlE-l0g_TOBFWkeSBywpye5geo/s640/DML+With+stripInaccessible.PNG" width="640" /></a></div>
<br />
You can also use the method to sanitize sObjects that have been deserialized from an untrusted source<br />
<br />
<br />
<br />
<br />
<br />
Further Reading<br />
<ol style="text-align: left;">
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_with_security_stripInaccessible.htm">https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_with_security_stripInaccessible.htm</a></li>
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_System_Security.htm#topic-title">https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_System_Security.htm#topic-title</a> </li>
</ol>
<br />
<br />
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com3tag:blogger.com,1999:blog-4216096443336193383.post-7805784638016345382020-01-19T09:34:00.000+05:302020-01-20T21:08:39.693+05:30Order of execution in Salesforce<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAysA2odOhixb66qX-0gJjcPeOIJ4JAKdnSjY9FHeW1PpUjwVvsNqXhXfrweKafqTIXZGKb5R0huDAk3hZcMZ1woqdj3-91i2_EuhvzFSSvz6y13R8zlZfcF5Vsl5836aWSbfFaiwSxZM/s1600/Order+of+Execution+in+Salesforce.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="648" data-original-width="1161" height="355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAysA2odOhixb66qX-0gJjcPeOIJ4JAKdnSjY9FHeW1PpUjwVvsNqXhXfrweKafqTIXZGKb5R0huDAk3hZcMZ1woqdj3-91i2_EuhvzFSSvz6y13R8zlZfcF5Vsl5836aWSbfFaiwSxZM/s640/Order+of+Execution+in+Salesforce.PNG" width="640" /></a></div>
<span style="font-family: "arial" , sans-serif; font-size: 10pt;">We did one session in <a href="http://www.apexhours.com/become-an-order-of-execution-hero/">apex hours </a>of How to become an Order of Execution Hero. In that session we did one deep drive in Salesforce Order of execution</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> and covered some interview question on order of execution.</span> Save Order of Execution is the most important factor in designing sustainable and scalable applications. </span><br />
<span style="font-family: "arial" , sans-serif; font-size: 10pt;">When you save a record with an insert, update, or upsert statement, Salesforce performs the following events in order. Here is cheat-sheet of Order of execution. </span><br />
<h3 style="text-align: left;">
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-size: large;">Order of Execution</span></span></h3>
<ol style="text-align: left;">
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Loads Initial record</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">.</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> If the request came from a standard UI edit page, Salesforce runs <b><u>system validation</u></b> to check the record for page layout specific rules, field definition, Maximum field length</span><span style="font-family: "arial" , sans-serif;">.</span></li>
<li><span style="font-family: "arial" , sans-serif;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes flows that make before-save update. (New Change in Winter 20)</span></span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>all before triggers</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Runs most <u><b>Custom </b></u><b><u>validation</u></b>.</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes </span><u><b><span style="font-family: "arial" , sans-serif; font-size: 10pt;">duplicate rules</span></b></u><span style="font-family: "arial" , sans-serif; font-size: 10pt;">.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><b><u><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Saves</span></u></b><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> the record to the database, but doesn't commit yet.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>all after triggers</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>assignment rules</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>auto-response rules</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>workflow rules</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">If there are <b><u>workflow field updates</u></b>, updates the record again.</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">If workflow field updates introduced new duplicate field values, executes duplicate rules again.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> <span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">If the record was updated with workflow field updates, <b><u>fires before </u></b></span><b><u><span style="color: #00008c; font-family: "arial" , sans-serif; font-size: 10pt;">update</span></u></b><b><u><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> triggers and after </span></u></b><b><u><span style="color: #00008c; font-family: "arial" , sans-serif; font-size: 10pt;">update</span></u></b><b><u><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> triggers one more time (and only one more time), in addition to standard validations. Custom validation rules are not run again</span></u></b><span style="font-family: "arial" , sans-serif; font-size: 10pt;">.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"></span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes processes and flow.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>escalation rules</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>entitlement rules</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">If the record contains <b><u>a roll-up summary field</u></b> or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">If the parent record is updated, and a <b>grandparent </b>record contains a roll-up summary field or is part of a <b><u>cross-object workflow</u></b>, performs calculations and updates the roll-up summary field in the grandparent record. Grandparent record goes through save procedure.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes <b><u>Criteria Based Sharing evaluation</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Commits all <b><u>DML operations to the database</u></b>.</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"></span></span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Executes all <u><b>after</b></u><b><u>-commit logic, such as sending email</u></b>.</span></li>
</ol>
<br />
<h3 style="text-align: left;">
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-size: large;">What is part of the after commit logic?</span></span></h3>
<ol style="text-align: left;">
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">All email sends</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Asynchronous Apex: @future methods</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Async Sharing Rule processing (for >25,000 records)</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Outbound Messages placed on queue</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Calculate Index, such as Search Index</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Render File Previews</span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Publication of Platform Events (if configured)</span></li>
</ol>
<b><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">NOTE: </span></span></b><i><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">The order of execution isn’t guaranteed when having multiple triggers for the same object due to the same event. For example, if you have two before insert triggers for Case, and a new Case record is inserted that fires the two triggers, the order in which these triggers fire isn’t guaranteed.</span></span></i><br />
<br />
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Check this post for more detail <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm">Triggers and Order of Execution</a>.</span> </span></span><br />
<h2 style="text-align: left;">
<span style="font-size: x-large;"><b><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">How deep is your knowledge of the Order of Execution ?</span></span></b></span></h2>
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">There's a
lot more to know than triggers run before workflows. Dig deeper,
understand the logic flow and your apps will scale better and run more
reliably.</span> </span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Become an
Order of Execution hero and walk away with an understanding of how to
design robust apps optimized for scale and how to control recursion and
remedy typical problems. </span> </span><br />
<br />
<h3 style="text-align: left;">
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-size: large;">What kind of issues did you experience ?</span></span></h3>
<ul style="text-align: left;">
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;">Unexpected Outcomes </span></span></li>
<ul>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;"> Missing or duplicate records</span></span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;"> Blank or “wrongly” populated fields</span></span></li>
</ul>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;">Hitting Limits</span></span></li>
<ul>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;"> CPU Time Limit Exception</span></span></li>
<li><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;"> Too many SOQL Queries</span></span></li>
</ul>
</ul>
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><span style="font-weight: normal;"></span></span><br />
<h3 style="text-align: left;">
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"></span></h3>
<br />
<span style="font-family: "arial" , sans-serif; font-size: 10pt;">Here is recording of our <a href="http://www.apexhours.com/become-an-order-of-execution-hero/">Apex Hour session</a>. </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/6CQk2BOVGcI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/6CQk2BOVGcI?feature=player_embedded" width="320"></iframe></div>
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"><br /></span>
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"> </span><br />
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<span style="font-family: "arial" , sans-serif; font-size: 10pt;">Further Reading:</span></h3>
<span style="font-family: "arial" , sans-serif; font-size: 10pt;"> <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm">https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm</a> </span><br />
<br />
<br />
<span style="font-family: "arial" , sans-serif; font-size: 10pt;">Thanks,</span><br />
<span style="font-family: "arial" , sans-serif; font-size: 10pt;">Amit Chaudhary</span></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-38762614948437504922020-01-03T02:17:00.001+05:302020-01-03T02:17:50.684+05:30Lightning Datatable Sorting in Lightning Web Components<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu6qw7faCdoVVJ45IpkfMzlMjLGDC8GMOlmAQTF0WPsiH1hTW1ymOEv_uLM76AFIdyKyVkQzNPnfWqjCcf7ShcSJEqeTKRDPqSeK7HCkjyoFzPpmeHsv-Xgg4z4PWJQQgW6jwPNfwFB4A/s1600/Lightning+Datatable+Sorting+in+Lightning+Web+Components.PNG" imageanchor="1"><img alt="Lightning Datatable Sorting in Lightning Web Components" border="0" data-original-height="549" data-original-width="973" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu6qw7faCdoVVJ45IpkfMzlMjLGDC8GMOlmAQTF0WPsiH1hTW1ymOEv_uLM76AFIdyKyVkQzNPnfWqjCcf7ShcSJEqeTKRDPqSeK7HCkjyoFzPpmeHsv-Xgg4z4PWJQQgW6jwPNfwFB4A/s640/Lightning+Datatable+Sorting+in+Lightning+Web+Components.PNG" title="Lightning Datatable Sorting in Lightning Web Components" width="640" /></a></div>
<div style="text-align: left;">
Last time we talk about <a href="http://amitsalesforce.blogspot.com/2019/10/lightning-datatable-in-lightning-web-component.html" target="_blank">Lightning Datatable</a> in Lightning Web Components (LWC). In this post we will talk about lightning datatable example with sorting. We know lightning-datatable component displays in tabular data and each column can be displayed based on the data type. We can also achieve the column sorting with the help of <b>onsort</b> attribute in datatable. I hope <a href="http://amitsalesforce.blogspot.com/2018/09/vs-code-for-salesforce-visual-studio.html" target="_blank">VsCode </a>is already setup on you machine and you know how to create Lightning Web Component. If not please check our <a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html" target="_blank">Get started with Salesforce lightning web components</a> post.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<span style="font-size: large;">Lightning-datatable</span> </h3>
<div style="text-align: left;">
Lightning datatable provides an <b>onsort</b> attribute which allow us to implement the sorting in lightning datatable. To enable the sorting on row you need to set <b>sortable</b> to true for the column and set <b>sorted-By</b> to match the fieldName attribute on the column. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Use <b>onsort</b> <a href="https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation" target="_blank">event handler</a> to update the table with the new column index and sort direction. The sort event returns the following parameter.</div>
<ol style="text-align: left;">
<li><b>fieldName </b>The fieldName that controls the sorting.</li>
<li><b>sortDirection </b>The sorting direction. Valid options include 'asc' and 'desc'.</li>
</ol>
<div style="text-align: left;">
You can implement sorting locally or via apex call.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Local Sorting:</span></span></h3>
<div style="text-align: left;">
We mostly implement this type of sorting when we know data elements in lightning datatable is small and limited. </div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
<b>1) Create Apex Class. </b></h4>
<div style="text-align: left;">
To select certain contacts using SOQL, use an Apex method. Check this post to learn about <a href="http://amitsalesforce.blogspot.com/2018/12/Invoke-Apex-Controller-from-Lightning-Web-Component.html" target="_blank">how to Call Apex Methods in LWC</a>.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>LWCDataTableSortingExample:</b> </div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
public with sharing class LWCDataTableSortingExample {<br /> @AuraEnabled(Cacheable=true)<br /> public static List <Contact> getContacts() {<br /> List<Contact> contList = [ SELECT Id, FirstName, LastName, Phone, Email<br /> FROM Contact<br /> LIMIT 10 ];<br /> return contList;<br /> } <br />}</div>
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><b><br class="Apple-interchange-newline" /></b><h4 style="text-align: left;">
<b>2) Create Lightning web component.</b></h4>
<div style="text-align: left;">
Create one <a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html" target="_blank">Lightning web component in your developer org or sandbox</a>.</div>
<b>dataTableSortingLWC.html</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br /> <lightning-card title="Data Sorting in Lightning Datatable in LWC" icon-name="standard:contact" ><br /> <br/><br /> <div style="width: auto;"><br /> <template if:true={data}><br /> <lightning-datatable data={data}<br /> columns={columns}<br /> key-field="id"<br /> sorted-by={sortBy}<br /> sorted-direction={sortDirection}<br /> onsort={doSorting}<br /> hide-checkbox-column="true"></lightning-datatable><br /> </template><br /> </div><br /> </lightning-card><br /></template></div>
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><br />
<br />
<b>dataTableSortingLWC.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import {LightningElement, wire, track} from 'lwc';<br />import getContacts from '@salesforce/apex/LWCDataTableSortingExample.getContacts';<br /><br />// datatable columns with row actions. Set sortable = true<br />const columns = [ { label: 'FirstName', fieldName: 'FirstName', sortable: "true"}, <br /> { label: 'LastName', fieldName: 'LastName', sortable: "true"}, <br /> { label: 'Phone', fieldName: 'Phone', type: 'phone', sortable: "true"}, <br /> { label: 'Email', fieldName: 'Email', type: 'email', sortable: "true" },];<br /><br />export default class DataTableSortingLWC extends LightningElement {<br /> @track data;<br /> @track columns = columns;<br /> @track sortBy;<br /> @track sortDirection;<br /> <br /> @wire(getContacts)<br /> contacts(result) {<br /> if (result.data) {<br /> this.data = result.data;<br /> this.error = undefined;<br /> } else if (result.error) {<br /> this.error = result.error;<br /> this.data = undefined;<br /> }<br /> }<br /><br /> doSorting(event) {<br /> this.sortBy = event.detail.fieldName;<br /> this.sortDirection = event.detail.sortDirection;<br /> this.sortData(this.sortBy, this.sortDirection);<br /> }<br /><br /> sortData(fieldname, direction) {<br /> let parseData = JSON.parse(JSON.stringify(this.data));<br /> // Return the value stored in the field<br /> let keyValue = (a) => { <br /> return a[fieldname];<br /> };<br /> // cheking reverse direction <br /> let isReverse = direction === 'asc' ? 1: -1;<br /> // sorting data <br /> parseData.sort((x, y) => {<br /> x = keyValue(x) ? keyValue(x) : ''; // handling null values<br /> y = keyValue(y) ? keyValue(y) : '';<br /> // sorting values based on direction<br /> return isReverse * ((x > y) - (y > x));<br /> });<br /> this.data = parseData;<br /> } <br />}</div>
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><br class="Apple-interchange-newline" /><div style="text-align: left;">
</div>
<b>dataTableSortingLWC.js-meta.xml</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<?xml version="1.0" encoding="UTF-8"?><br /><LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="dataTableSortingLWC"><br /> <apiVersion>46.0</apiVersion><br /> <isExposed>true</isExposed><br /> <targets><br /> <target>lightning__AppPage</target><br /> <target>lightning__RecordPage</target><br /> <target>lightning__HomePage</target><br /> </targets><br /></LightningComponentBundle></div>
<h3 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;"> </span></span></h3>
<h3 style="text-align: left;">
<span style="color: blue;"><span style="font-size: large;">Sorting by Apex Call:</span></span></h3>
<div style="text-align: left;">
We also have another way of data sorting with Apex class.</div>
<h4 style="text-align: left;">
<b>1) Create Apex Class. </b></h4>
<div style="text-align: left;">
<b>LWCDataTableSortingExample:</b> </div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
public with sharing class LWCDataTableSortingExample {<br /> @AuraEnabled(Cacheable=true)<br /> public static List <Contact> getContacts(String field, String sortOrder) {<br /> String query;<br /> query = 'SELECT Id, FirstName, LastName, Phone, Email FROM Contact';<br /> if(field != null && sortOrder !=null){<br /> query += ' ORDER BY '+field+' '+sortOrder;<br /> }<br /> return Database.query(query);<br /> }<br />}</div>
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><b></b><h4 style="text-align: left;">
<b>2) Create Lightning web component.</b></h4>
<div style="text-align: left;">
</div>
<b>dataTableSortingLWC.html</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br /> <lightning-card title="Data Sorting by Apex" icon-name="standard:contact" ><br /> <br/><br /> <div style="width: auto;"><br /> <template if:true={data}><br /> <lightning-datatable data={data}<br /> columns={columns}<br /> key-field="id"<br /> sorted-by={sortBy}<br /> sorted-direction={sortDirection}<br /> onsort={doSorting}<br /> hide-checkbox-column="true"></lightning-datatable><br /> </template><br /> </div><br /> </lightning-card><br /></template></div>
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><br />
<b>dataTableSortingLWC.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import {LightningElement, wire, track} from 'lwc';<br />import getContacts from '@salesforce/apex/LWCDataTableSortingExample.getContacts';<br /><br />// datatable columns with row actions<br />const columns = [ { label: 'FirstName', fieldName: 'FirstName', sortable: "true"}, <br /> { label: 'LastName', fieldName: 'LastName', sortable: "true"}, <br /> { label: 'Phone', fieldName: 'Phone', type: 'phone', sortable: "true"}, <br /> { label: 'Email', fieldName: 'Email', type: 'email', sortable: "true" },];<br /><br />export default class DataTableSortingLWC extends LightningElement {<br /> // reactive variable<br /> @track data;<br /> @track columns = columns;<br /> @track sortBy='FirstName'<br /> @track sortDirection='asc';<br /> <br /> // retrieving the data using wire service<br /> @wire(getContacts,{field : '$sortBy',sortOrder : '$sortDirection'})<br /> contacts(result) {<br /> if (result.data) {<br /> this.data = result.data;<br /> this.error = undefined;<br /> } else if (result.error) {<br /> this.error = result.error;<br /> this.data = undefined;<br /> }<br /> }<br /><br /> doSorting(event) {<br /> // calling sortdata function to sort the data based on direction and selected field<br /> this.sortBy = event.detail.fieldName;<br /> this.sortDirection = event.detail.sortDirection;<br /> this.sortData(this.sortBy, this.sortDirection);<br /> }<br /><br /> sortData(fieldname, direction) {<br /> let parseData = JSON.parse(JSON.stringify(this.data));<br /> // Return the value stored in the field<br /> let keyValue = (a) => { <br /> return a[fieldname];<br /> };<br /> // cheking reverse direction <br /> let isReverse = direction === 'asc' ? 1: -1;<br /> // sorting data <br /> parseData.sort((x, y) => {<br /> x = keyValue(x) ? keyValue(x) : ''; // handling null values<br /> y = keyValue(y) ? keyValue(y) : '';<br /> // sorting values based on direction<br /> return isReverse * ((x > y) - (y > x));<br /> });<br /><br /> // set the sorted data to data table data<br /> this.data = parseData;<br /> } <br />}</div>
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><b><br class="Apple-interchange-newline" /></b>
<br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #333333; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Please check below post on Lightning Web Components:-</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<ol>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html" style="color: #6699cc; text-decoration: none;" target="_blank"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Lightning Web Components ( LWC ) in Salesforce with Non-Scratch Org</span></a></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2018/12/Invoke-Apex-Controller-from-Lightning-Web-Component.html" style="color: #33aaff; text-decoration: underline;" target="_blank"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Invoke Apex Controller from Lightning Web Component | Lightning Web Component inside Another LWC</span></a></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://amitsalesforce.blogspot.com/2019/01/design-attributes-in-lightning-web-components-css-svg.html" style="color: #6699cc; text-decoration: none;" target="_blank">Design attributes in Lightning Web Components | CSS and SVG Files | Lightning Web Components | targetConfigs</a></span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://amitsalesforce.blogspot.com/2019/01/how-to-get-current-user-id-in-lightning-web-components.html" style="color: #6699cc; text-decoration: none;" target="_blank">How to get current user id in lightning web component | Access logged in user ID in LWC </a></span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://amitsalesforce.blogspot.com/2019/01/toast-notification-in-lightning-web-components.html" style="color: #6699cc; text-decoration: none;" target="_blank">Toast Notification in Lightning Web Components | ShowToastEvent | (LWC)</a> </span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"></span></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://amitsalesforce.blogspot.com/2019/03/lightning-web-components-best-practices.html" style="color: #6699cc; text-decoration: none;" target="_blank">Lightning Web Components Best practices </a></span></span></span></span></span></u></b></li>
<b><u><span style="color: black;"><span style="color: blue;"></span></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://amitsalesforce.blogspot.com/2019/07/events-in-lightning-web-components-lwc.html" style="color: #6699cc; text-decoration: none;" target="_blank">Events in Lightning web components (LWC) | Communicate with Events</a></span></span></span></span></u></b></li>
<b><u><span style="color: black;"></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><b><u><span style="color: black;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2019/10/lightning-datatable-in-lightning-web-component.html" style="color: #6699cc; text-decoration: none;" target="_blank"><span style="color: blue;"><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Lightning datatable In Lightning Web Components | lightning datatable inline edit</span></span></a></span></span></u></b></li>
<b><u><span style="color: black;"></span></u></b>
<li style="margin: 0px 0px 0.25em; padding: 0px; text-indent: 0px;"><span style="color: blue;"><b><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><u><span style="color: black;"><span style="color: blue;"><a href="http://amitsalesforce.blogspot.com/2019/10/lightning-message-service-lms.html" style="color: #6699cc; text-decoration: none;" target="_blank">Lightning Message Service (LMS) | MessageChannel</a></span></span></u></span><span style="background-color: white; display: inline; float: none; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 14.85px; font-style: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /> </span></b></span></li>
</ol>
</div>
<b><br class="Apple-interchange-newline" /></b>
<b>Thanks</b><br />
<b>Amit Chaudhary</b><br />
<div style="text-align: left;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></div>
</div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-24889683785971538242019-12-28T09:04:00.000+05:302019-12-31T19:07:49.915+05:30Salesforce Admin Training | Become a Salesforce Administrator<div dir="ltr" style="text-align: left;" trbidi="on">
We are glad that we did Free Salesforce Admin Training in <a href="http://www.apexhours.com/session-in-2019/" target="_blank">2019</a> at <a href="http://www.apexhours.com/salesforce-apex-hours-for-students/" target="_blank">ApexHours</a>. Good news is that we recorded all sessions and uploaded all Salesforce training videos on our <a href="https://www.youtube.com/playlist?list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i" target="_blank">YouTube Channel</a>. We created this Training program for a Student and new System admin to becoming a Salesforce Administrator. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQqrDSWBF9jNfNgiH3EjCPoFaJgXW_PVaRDm6Onz1U26C64hzjJ6pu2aagA8zBR_Xfx4gScH42lPQ3iQ9Ji_YIL9k2PW66ErZ9op3iqn_dZK6bm_qX4ru1i5D96WjdyqJoJPUOe1QCOSs/s1600/Salesforce+Admin+Training.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Salesforce Administrator" border="0" data-original-height="369" data-original-width="959" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQqrDSWBF9jNfNgiH3EjCPoFaJgXW_PVaRDm6Onz1U26C64hzjJ6pu2aagA8zBR_Xfx4gScH42lPQ3iQ9Ji_YIL9k2PW66ErZ9op3iqn_dZK6bm_qX4ru1i5D96WjdyqJoJPUOe1QCOSs/s640/Salesforce+Admin+Training.PNG" title="Salesforce Administrator" width="640" /></a></div>
<br />
This Salesforce Administrator Training for Beginners covered the all below topics:-<br />
<ol style="text-align: left;">
<li><a href="http://www.apexhours.com/introduction-to-salesforce/" target="_blank">Introduction to Cloud Computing and Salesforce</a></li>
<li><a href="http://www.apexhours.com/model-your-salesforce-data/" target="_blank">Modelling Data in Salesforce</a></li>
<li><a href="http://www.apexhours.com/customize-the-salesforce-user-interface/" target="_blank">Customizing the User Interface</a></li>
<li><a href="http://www.apexhours.com/aggregating-validating-data/" target="_blank">Aggregating & Validating Salesforce Data</a></li>
<li><a href="http://www.apexhours.com/automating-business-processes-part-1/" target="_blank">Automating Business Processes - Part 1</a>(Process Builder and Workflow)</li>
<li><a href="http://www.apexhours.com/automating-business-processes-part-2/" target="_blank">Automating Business Processes - Part 2</a> (Flow)</li>
<li><a href="http://www.apexhours.com/episode-7-automating-business-processes-part-3/" target="_blank">Automating Business Processes - Part 3</a> (Approval process)</li>
<li><a href="http://www.apexhours.com/managing-data-access-in-salesforce/" target="_blank">Managing Data Access</a></li>
<li><a href="http://www.apexhours.com/who-sees-what-in-salesforce/" target="_blank">Who Sees What in Salesforce?</a></li>
<li><a href="http://www.apexhours.com/audit-troubleshoot-salesforce-data/" target="_blank">Auditing & Troubleshooting Errors</a></li>
<li><a href="http://www.apexhours.com/data-management-in-salesforce/" target="_blank">Data Management with Salesforce</a></li>
<li><a href="http://www.apexhours.com/reports-dashboards/" target="_blank">Making Sense of your Salesforce Data </a></li>
</ol>
<br />
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<span style="font-size: x-large;">Episode 1 – Introduction to Salesforce</span></h3>
<br />
<a href="https://www.youtube.com/watch?v=bxtqhfyoTjY&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=2&t=0s" target="_blank">In this episode</a> we learned about what is Cloud computing and Introduction to Salesforce. <a href="https://www.youtube.com/watch?v=bxtqhfyoTjY&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=2&t=0s" target="_blank">In Episode 1</a>, we covered the following topics :-<br />
<ol style="text-align: left;">
<li>Fundamentals of Cloud Computing</li>
<li>Customer Relationship Management Basics</li>
<li>Creating your first Salesforce org</li>
<li>Salesforce Classic Vs Lightning Experience</li>
<li>Q & A</li>
</ol>
Here is recording of "<b>Introduction to Salesforce</b>" episode recording.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/bxtqhfyoTjY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/bxtqhfyoTjY?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: large;"><span style="font-size: x-large;">Episode 2 – Model your Salesforce Data</span></span></h3>
<br />
<a href="https://www.youtube.com/watch?v=3UfhymS5luQ&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=2" target="_blank">In this episode</a> we covered data model in Salesforce, Difference between Master-detail and Lookup fields. We also talk about depended picklist and schema builder. Here is agenda of session <a href="https://www.youtube.com/watch?v=3UfhymS5luQ&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=2" target="_blank">Episode 2</a>. <br />
<br />
<ol style="text-align: left;">
<li>Conventional Database Tables Vs Objects</li>
<li>Standard and Custom Objects</li>
<li>Datatypes</li>
<li>Relational Data Modelling</li>
<li>Schema Builder</li>
<li>Q & A</li>
</ol>
Here is recording of "<b>Salesforce Data Model</b>" episode recording.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/3UfhymS5luQ/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/3UfhymS5luQ?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Episode 3 – Customize the Salesforce User Interface</span></h3>
<br />
<div style="text-align: left;">
<a href="https://www.youtube.com/watch?v=ZkQwm-6lsIw&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=3" target="_blank">In this episode</a> we talk about customizing Salesforce user interface to improve user experience. After checking this recording you will learn how to create Application & Tab in Salesforce, What is record Types and App Builder. <a href="https://www.youtube.com/watch?v=ZkQwm-6lsIw&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=3" target="_blank">In Episode 3</a>, we covered the following topics :-</div>
<ol style="text-align: left;">
<li>App Manager & Tabs</li>
<li>Customizing Page Layouts using Record Types</li>
<li>List Views & Related Lists</li>
<li>Mini & Compact Page Layouts</li>
<li>App Builder</li>
<li>Q & A </li>
</ol>
<div style="text-align: left;">
</div>
Here is recording of "<b>Customize Salesforce User Interface</b>" episode recording.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ZkQwm-6lsIw/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/ZkQwm-6lsIw?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;"><b>Episode 4 – Aggregating & Validating Data</b></span></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Aggregating and validating data is fundamental for all Salesforce application. <a href="https://www.youtube.com/watch?v=bz2OirY2SVU&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=4" target="_blank">This episode</a> talks about putting validations, Duplicate Rules within Salesforce to enforce data integrity and aggregating relational records. <a href="https://www.youtube.com/watch?v=bz2OirY2SVU&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=4" target="_blank">In Episode 4</a>, We will cover the following topics :-</div>
<ol style="text-align: left;">
<li>Formula field</li>
<li>Data Aggregation using Roll-up Summaries</li>
<li>Validation Rules</li>
<li>Duplicate Rules</li>
<li>Q & A</li>
</ol>
<div style="text-align: left;">
Here is recording of "<b>Aggregating & Validating Data</b>" episode recording.</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/bz2OirY2SVU/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/bz2OirY2SVU?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;"><span style="font-weight: normal;"><span id="goog_1653422703"></span><span id="goog_1653422704"></span></span></span><span style="font-size: large;"><span style="font-size: x-large;">Episode 5 – Automating Business Process with Workflow, Email Template and Process Builder</span><b>.</b></span></h3>
<br />
<a href="https://www.youtube.com/watch?v=65QivvdfjGs&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=5" target="_blank">In episode 5</a> we talks about the declarative tools available on Salesforce to automate business processes using workflow and process builder. In this episode we talk about what is the difference between Workflow and Process Builder. And when we should use Process Builder over the workflow. <a href="https://www.youtube.com/watch?v=65QivvdfjGs&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=5" target="_blank">In Episode 5</a>, we will cover the following topics :-<br />
<ol style="text-align: left;">
<li>What is a Business Process?</li>
<li>Automating Processes using</li>
<ol>
<li>Workflow Rule</li>
<li>Process Builder</li>
<li>Email Templates</li>
</ol>
<li>Q & A</li>
</ol>
<br />
Here is recording of "<b>Workflow, Email Template and Process Builder</b>" episode recording. <br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/65QivvdfjGs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/65QivvdfjGs?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-size: x-large;"><b>Episode 6 – Automating Business Processes with Flow.</b></span></h3>
<br />
In <a href="https://www.youtube.com/watch?v=kEiQ98OJHyE&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=6" target="_blank">this episode</a> we talk about how to automate your business process with flow, Difference between Workflow Vs Process Builder Vs Lightning Flow, Know the Nomenclature between Lightning flow Vs Flow Builder Vs Flow Interview. In <a href="https://www.youtube.com/watch?v=kEiQ98OJHyE&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=6" target="_blank">Episode 6</a>, we will cover the following topics :-<br />
<ol style="text-align: left;">
<li>Declarative Tools for Business Process Automation</li>
<li>Assignment Rules</li>
<li>Flow Builder</li>
<li>Q & A</li>
</ol>
Here is recording of "<b>Basic of Lightning Flow and Assignment Rule in Salesforce</b>" episode recording. <br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/kEiQ98OJHyE/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/kEiQ98OJHyE?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;"><b><span style="font-size: x-large;">Episode 7 – Automating Business Processes with Approval Process.</span></b></span></h3>
<br />
In <a href="https://www.youtube.com/watch?v=nJfWaJ5y4jM&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=7" target="_blank">this episode</a> we talk about how to setup the Approval process in Salesforce and what is delegated Approver in Salesforce. In <a href="https://www.youtube.com/watch?v=nJfWaJ5y4jM&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=7" target="_blank">Episode 7</a>, we coverd the following topics :-<br />
<ol style="text-align: left;">
<li>Declarative Tools for Business Process Automation</li>
<li>Approval Process</li>
<li>Q & A</li>
</ol>
<div style="text-align: left;">
</div>
Here is recording of "<b>Setup Approval process in Salesforce</b>" episode recording. <br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/nJfWaJ5y4jM/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/nJfWaJ5y4jM?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;"><b>Episode 8 – Managing Data Access in Salesforce</b></span></h3>
<br />
In <a href="https://www.youtube.com/watch?v=iWbVm_o9Z0Q&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=8" target="_blank">this episode</a> we talk about what is the difference between Profiles and role and Permission Sets. How to enforce field level security and User Management. In <a href="https://www.youtube.com/watch?v=iWbVm_o9Z0Q&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=8" target="_blank">Episode 8</a>, we covered the following topics :-<br />
<ol style="text-align: left;">
<li>Profiles & Permission Sets</li>
<li>Enforcing Field Level Security</li>
<li>User Management</li>
<li>Q & A</li>
</ol>
Here is recording of "<b>Difference between Profiles and Role and Permission Sets</b>" episode recording. <br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/iWbVm_o9Z0Q/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/iWbVm_o9Z0Q?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Episode 9 – Who Sees What in Salesforce</span></h3>
<br />
In this session we talk about Organization Wide Defaults(OWD) in salesforce and Sharing Setting. Difference between Record Ownership and Record Sharing and Profile Vs Roles. In <a href="https://www.youtube.com/watch?v=Hs9xlhi_Y_k&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=9" target="_blank">Episode 9</a>, we will cover the following topics :-<br />
<ol style="text-align: left;">
<li>OWD & Sharing Settings</li>
<li>Record Ownership</li>
<li>Record Sharing</li>
<li>Profiles Vs Roles</li>
<li>Q & A</li>
</ol>
Here is recording of "<b>OWD & Sharing Setting</b>" episode recording.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Hs9xlhi_Y_k/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Hs9xlhi_Y_k?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;">Episode 10 – Audit & Troubleshoot Salesforce Data</span></h3>
<br />
In <a href="https://www.youtube.com/watch?v=bAhCBCZ84xI&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=10" target="_blank">this session</a> we talk about audit logs and field history Tracking include debug logs. In <a href="https://www.youtube.com/watch?v=bAhCBCZ84xI&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=10" target="_blank">Episode 10</a>, we will cover the following topics<br />
<ol style="text-align: left;">
<li>Audit Logs & Field History Tracking</li>
<li>Debug Logs</li>
<li>Email Logs</li>
<li>Login History & IP Whitelisting</li>
<li>Q & A</li>
</ol>
<div style="text-align: left;">
Here is recording of "<b>Audit & Troubleshooting of Salesforce Data</b>" episode recording.</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/bAhCBCZ84xI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/bAhCBCZ84xI?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;"><b>Episode 11 – Data Management in Salesforce</b></span></h3>
<br />
In <a href="https://www.youtube.com/watch?v=oG5y-ynaREY&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=11" target="_blank">Episode 11</a>, we will cover the following topics :-<br />
<ol style="text-align: left;">
<li>Data Loader</li>
<li>Uploading Relational Data in Salesforce</li>
<li>Best Practices for Data Management</li>
<li>Q & A</li>
</ol>
<br />
Here is recording of "<b>Data Loader & Import Wizard</b>" episode recording.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/oG5y-ynaREY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/oG5y-ynaREY?feature=player_embedded" width="320"></iframe></div>
<br />
<h3 style="text-align: left;">
<span style="font-size: x-large;"><b>Episode 12 – Reports & Dashboards.</b></span></h3>
<br />
This episode talks about the tools available to effectively report on the data within Salesforce to measure performance in Key Business Areas. In <a href="https://www.youtube.com/watch?v=hKQTJ3L3opg&list=PLaGX-30v1lh1BaUKgXa05gqrOP0vUg_6i&index=12" target="_blank">Episode 12</a>, we will cover the following topics :-<br />
<ol style="text-align: left;">
<li>Report Types</li>
<li>Standard & Custom Report Types</li>
<li>Dashboards</li>
<li>Share and Schedule Report/Dashboard </li>
<li>Q & A</li>
</ol>
Here is recording of "<b>Lightning Report and Dashboards</b>" episode recording.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/hKQTJ3L3opg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/hKQTJ3L3opg?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
<br />
<br />
<div style="text-align: left;">
</div>
<br />
<br />
<br />
<br />
All the best for your Salesforce certifications.<br />
<br />
<br />
We did 12+ sessions with our 5 speakers ( <b>Jigar Shah, Amit Singh, Atul
Rajguru and Purushottam Bhaigade , Jayesh</b>) and we got 1300+
registration.<br />
<br />
Thank you so much for all our Apex Hours Speaker to help all Student.<br />
<br />
Here is some more useful playlist for New Salesforce Developer or Admin.<br />
1) <a href="https://www.youtube.com/watch?v=fF_C_GGJMC0&list=PLaGX-30v1lh0yjm8UbB-4smaykJzCsH2y" target="_blank">Setup Salesforce Community</a><br />
2) <a href="https://www.youtube.com/watch?v=XNb8tO7f6lc&list=PLaGX-30v1lh25iKwpbWHeciyPvJPvfLYg" target="_blank">Basic of Java Script</a>.<br />
3) <a href="https://www.youtube.com/watch?v=nRhftldmmyc&list=PLaGX-30v1lh34rpIP_g1Daabqq7_xvcmp" target="_blank">Marketing Cloud</a>.<br />
<br />
<br />
<br />
<br />
Thanks,<br />
Amit Chaudhary<br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com3tag:blogger.com,1999:blog-4216096443336193383.post-67370206796560951282019-12-14T10:32:00.002+05:302019-12-15T22:05:59.154+05:30Introduction to Salesforce Marketing Cloud <div dir="ltr" style="text-align: left;" trbidi="on">
In this post we will talk about what is Salesforce marketing cloud and how to get started with Marketing cloud email Studio. Salesforce Marketing Cloud is a provider of digital marketing automation and analytics software and services. Marketing cloud is the platform for delivering relevant, personalized journeys across channels and devices – enabling marketers to deliver the right messages to the right people via the right channel<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioUdF5CyLd_JDcC3Gm9DC8ZVM4YmTRlTmy9F4iKPdxLHOHfLQGwimpc-TxmgvliMWv6KmDa3i9MCO2J_Y1pY11csDkU4Tpg-p2_5Ew5n5LTwsn6gM3wl7-t-auxvsB_5SCv8wRAl3AIyU/s1600/Introduction+to.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Introduction to Salesforce Marketing Cloud " border="0" data-original-height="671" data-original-width="1490" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioUdF5CyLd_JDcC3Gm9DC8ZVM4YmTRlTmy9F4iKPdxLHOHfLQGwimpc-TxmgvliMWv6KmDa3i9MCO2J_Y1pY11csDkU4Tpg-p2_5Ew5n5LTwsn6gM3wl7-t-auxvsB_5SCv8wRAl3AIyU/s640/Introduction+to.PNG" title="Introduction to Salesforce Marketing Cloud " width="640" /></a></div>
<br />
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: x-large;">What is Marketing Cloud ?</span></span></h2>
<ol style="text-align: left;">
<li>Marketing Cloud is comprised of a suite of studios and builders (Email Studio, Journey Builder, etc.).</li>
<li>The platform lets you manage messaging through multiple channels: email, sms, ads, and push.</li>
<li>Automation Studio and Journey Builder allow customers to automate their marketing programs to increase reach and efficiency.</li>
<li>Tracking and reports provide analytics that allow customers to measure and improve their programs.</li>
<li>The API and SFTP enable integration with any external system. Customers use these to integrate with web analytics, data warehouses, CRM systems, POS systems, custom apps, and more.</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguWiN8UJaGNIFaxuPyTpwNJSjv8rwAsj1R60KFmn6bSaTqTczSTvsMJMCkHywJr213fmg4IFtJHcwrJWFI2SZHb-v1tsMZ-7NGLDr4fbTMhPNYuYUY8TVLdz95jSuKc_-ahPZmShDlZ60/s1600/Marketing+Cloud+Product.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="207" data-original-width="1304" height="101" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguWiN8UJaGNIFaxuPyTpwNJSjv8rwAsj1R60KFmn6bSaTqTczSTvsMJMCkHywJr213fmg4IFtJHcwrJWFI2SZHb-v1tsMZ-7NGLDr4fbTMhPNYuYUY8TVLdz95jSuKc_-ahPZmShDlZ60/s640/Marketing+Cloud+Product.PNG" width="640" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
table.MsoTableMediumShading2Accent1
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-tstyle-rowband-size:1;
mso-tstyle-colband-size:1;
mso-style-priority:64;
mso-style-unhide:no;
border-top:solid windowtext 2.25pt;
border-left:none;
border-bottom:solid windowtext 2.25pt;
border-right:none;
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
table.MsoTableMediumShading2Accent1FirstRow
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:first-row;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-shading:#4F81BD;
mso-tstyle-shading-themecolor:accent1;
mso-tstyle-border-top:2.25pt solid windowtext;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-bottom:2.25pt solid windowtext;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
mso-para-margin-top:0in;
mso-para-margin-bottom:0in;
mso-para-margin-bottom:.0001pt;
line-height:normal;
color:white;
mso-themecolor:background1;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading2Accent1LastRow
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:last-row;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-shading:white;
mso-tstyle-shading-themecolor:background1;
mso-tstyle-border-top:2.25pt double windowtext;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-bottom:2.25pt solid windowtext;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
mso-para-margin-top:0in;
mso-para-margin-bottom:0in;
mso-para-margin-bottom:.0001pt;
line-height:normal;
color:windowtext;}
table.MsoTableMediumShading2Accent1FirstCol
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:first-column;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-shading:#4F81BD;
mso-tstyle-shading-themecolor:accent1;
mso-tstyle-border-top:cell-none;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-bottom:2.25pt solid windowtext;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
color:white;
mso-themecolor:background1;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading2Accent1LastCol
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:last-column;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-shading:#4F81BD;
mso-tstyle-shading-themecolor:accent1;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
color:white;
mso-themecolor:background1;
mso-ansi-font-weight:bold;
mso-bidi-font-weight:bold;}
table.MsoTableMediumShading2Accent1OddColumn
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:odd-column;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-shading:#D8D8D8;
mso-tstyle-shading-themecolor:background1;
mso-tstyle-shading-themeshade:216;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;}
table.MsoTableMediumShading2Accent1OddRow
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:odd-row;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-shading:#D8D8D8;
mso-tstyle-shading-themecolor:background1;
mso-tstyle-shading-themeshade:216;}
table.MsoTableMediumShading2Accent1NECell
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:ne-cell;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-border-top:2.25pt solid windowtext;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-bottom:2.25pt solid windowtext;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;}
table.MsoTableMediumShading2Accent1NWCell
{mso-style-name:"Medium Shading 2 - Accent 1";
mso-table-condition:nw-cell;
mso-style-priority:64;
mso-style-unhide:no;
mso-tstyle-border-top:2.25pt solid windowtext;
mso-tstyle-border-left:cell-none;
mso-tstyle-border-bottom:2.25pt solid windowtext;
mso-tstyle-border-right:cell-none;
mso-tstyle-border-insideh:cell-none;
mso-tstyle-border-insidev:cell-none;
color:white;
mso-themecolor:background1;}
</style>
<![endif]-->
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableMediumShading2Accent1" style="border-collapse: collapse; border: medium none; margin-left: auto; margin-right: auto; text-align: left;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: -1;">
<td style="background: #4F81BD; border-bottom: solid windowtext 2.25pt; border-left: none; border-right: none; border-top: solid windowtext 2.25pt; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 517;">
<b><span style="color: white; mso-themecolor: background1;">Product</span></b></div>
</td>
<td style="background: #4F81BD; border-bottom: solid windowtext 2.25pt; border-left: none; border-right: none; border-top: solid windowtext 2.25pt; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 1;">
<b><span style="color: white; mso-themecolor: background1;">Description</span></b></div>
</td>
</tr>
<tr style="mso-yfti-irow: 0;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 68;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Audience Studio</span><span style="color: white; mso-themecolor: background1;"></span></b></div>
</td>
<td style="background: #D8D8D8; border: none; mso-background-themecolor: background1; mso-background-themeshade: 216; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 64;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Capture data from
any source and device, then unify, segment, and activate audiences to create
valuable customer experiences</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 4;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Data Studio</span><span style="color: white; mso-themecolor: background1;"></span></b></div>
</td>
<td style="border: none; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Expand your reach
with a data sharing platform where publishers can share 2nd party data with
marketers in a trusted and transparent way</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Google Analytics 360</span></b></td>
<td style="background: #D8D8D8; border: none; mso-background-themecolor: background1; mso-background-themeshade: 216; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Gain cross-channel
insights for seamless customer journeys with Google Analytics 360 + Marketing
Cloud.</span><span style="font-family: "arial" , "sans-serif"; font-size: 12.0pt;"><span style="mso-tab-count: 1;"> </span></span></td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 4;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Social Studio</span></b><br />
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;"></span><span style="color: white; mso-themecolor: background1;"></span></b></div>
</td>
<td style="border: none; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Listen, publish, and
engage to create customer advocates. Connect social to marketing, sales, and
service in one platform powered by AI.</span><br />
<span style="font-family: "arial" , "sans-serif"; font-size: 12.0pt;"><span style="mso-tab-count: 1;"></span><span style="color: #1e1e1c;"></span></span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 4;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 68;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Journey Builder</span><span style="color: white; mso-themecolor: background1;"></span></b></div>
</td>
<td style="background: #D8D8D8; border: none; mso-background-themecolor: background1; mso-background-themeshade: 216; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 64;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Deliver
cross-channel personalized experiences at every step of the customer
lifecycle with campaign</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 5;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 4;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Interaction Studio</span><span style="color: white; mso-themecolor: background1;"></span></b></div>
</td>
<td style="border: none; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Visualize, track,
and manage customer experiences with real-time interaction management—driving
valuable engagement at the right moment</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 6;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 68;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Email Studio</span><span style="color: white; mso-themecolor: background1;"></span></b></div>
</td>
<td style="background: #D8D8D8; border: none; mso-background-themecolor: background1; mso-background-themeshade: 216; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 64;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Use data from every
department to build smarter email—from basic marketing campaigns to
sophisticated 1-to-1 messages</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 7;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 4;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Mobile Studio</span></b></div>
</td>
<td style="border: none; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Send consistent SMS,
push, and chat app messages in real-time</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 8;">
<td style="background: #4F81BD; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 68;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Advertising Studio</span></b></div>
</td>
<td style="background: #D8D8D8; border: none; mso-background-themecolor: background1; mso-background-themeshade: 216; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 64;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;">Use CRM to securely
power 1-to-1 advertising across Google, Facebook, LinkedIn, Twitter,
Pinterest, and Display at scale</span></div>
</td>
</tr>
<tr style="mso-yfti-irow: 9; mso-yfti-lastrow: yes;">
<td style="background: #4F81BD; border-bottom: solid windowtext 2.25pt; border: none; mso-background-themecolor: accent1; padding: 0in 5.4pt 0in 5.4pt; width: 99.9pt;" valign="top" width="167"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-yfti-cnfc: 4;">
<b><span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;"><br /></span></b></div>
</td>
<td style="border-bottom: solid windowtext 2.25pt; border: none; padding: 0in 5.4pt 0in 5.4pt; width: 378.9pt;" valign="top" width="632"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #1e1e1c; font-family: "arial" , "sans-serif"; font-size: 12.0pt;"><br /></span></div>
</td>
</tr>
</tbody></table>
</div>
<div style="text-align: center;">
<br /></div>
<br />
Check this recording to learn about <a href="https://www.youtube.com/watch?v=XM2G6ucoc9M" target="_blank">basic of Marketing Cloud</a>. We did the session in <a href="http://www.apexhours.com/session-in-2019/" target="_blank">ApexHours</a>. The aim of this session was to conduct a basic introduction of the different studios and builders in Marketing Cloud and demonstrate a live walkthrough of setting up a campaign which will touch on data design and automation best practices.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/XM2G6ucoc9M/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/XM2G6ucoc9M?feature=player_embedded" width="320"></iframe></div>
<br />
<h2 style="text-align: left;">
Development Process</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY7t2XyqQW1V_TFHItMfTIDPPqAuUq9iYcb2VoDNrW5TOBHl8uJX-k6jL1mTdZaX4d2M7ON0lLJlIlfufFsmnCOC_AXk_qWVwyuO1fSkwcydFjyTj0Lia5eid0FW9_elMyK8m7TL5HOfI/s1600/Development+Process+in+Marketing+Cloud.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="601" data-original-width="1166" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY7t2XyqQW1V_TFHItMfTIDPPqAuUq9iYcb2VoDNrW5TOBHl8uJX-k6jL1mTdZaX4d2M7ON0lLJlIlfufFsmnCOC_AXk_qWVwyuO1fSkwcydFjyTj0Lia5eid0FW9_elMyK8m7TL5HOfI/s640/Development+Process+in+Marketing+Cloud.JPG" width="640" /></a></div>
<br />
<br />
<br />
<h2 style="text-align: left;">
<span style="color: blue;"><span style="font-size: x-large;">Marketing Cloud – Email Studio</span></span></h2>
<div style="text-align: left;">
Email Studio Create 1-to-1 customer journeys with personalized email marketing at scale. Email studio is great channel for reaching customers, email is better in conversions, Customers trust email It’s easy to track customer behavior —like which emails they open, which links they click, which offers they redeem, and on which devices. With Email Studio you can build great emails, segment and target your audience, and send with confidence—all without any coding. Share content development across channels: Easily tag, search, and share content across distribution channels—including email, social, and mobile using Content Builder—for content creation and management at scale.<br />
<br /></div>
<h3 style="text-align: left;">
Subscriber</h3>
<div style="text-align: left;">
A subscriber List is a Collection Of Subscribers Who Opted-in to receive email communication from marketing cloud. Subscriber automatically belong the standard all subscriber list, and additional subscriber list an be created to segment subscriber for targeted email communication.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU1vf8Ini1UMSBf_r4SCtTqi_otYeSV5Srx7y4-XIWI69Vjeakcsuv8mnv17fK5INghpVaBxF2Twjvt0JYq9R00CzBGk29Hq-SIACLt12PxtAzpPY-EMCrzVYX4umXlCtXBhZLdOwA5Ts/s1600/Subscriber+List.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="391" data-original-width="1256" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU1vf8Ini1UMSBf_r4SCtTqi_otYeSV5Srx7y4-XIWI69Vjeakcsuv8mnv17fK5INghpVaBxF2Twjvt0JYq9R00CzBGk29Hq-SIACLt12PxtAzpPY-EMCrzVYX4umXlCtXBhZLdOwA5Ts/s640/Subscriber+List.PNG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Data Modeling & Segmentation</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVzVdOq26durdkkY50nuh8Y5Tf_GH77e96k1rX3prYs84k23PAJQ2FqVYydrrdS7S9kZG5v0KuWO8D23IP3VNuPnT_csdsWUaAAZL8c4hZGa0_uzwN0itD7_GjgqM78KiqegHhdTHHkvk/s1600/Data+Design.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="373" data-original-width="959" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVzVdOq26durdkkY50nuh8Y5Tf_GH77e96k1rX3prYs84k23PAJQ2FqVYydrrdS7S9kZG5v0KuWO8D23IP3VNuPnT_csdsWUaAAZL8c4hZGa0_uzwN0itD7_GjgqM78KiqegHhdTHHkvk/s640/Data+Design.PNG" width="640" /></a></div>
<h3 style="text-align: left;">
</h3>
<h4 style="text-align: left;">
List</h4>
<ol style="text-align: left;">
<li>Lists are the default method of storing subscriber data in the Email application.</li>
<li>They require minimal configuration and setup.</li>
<li>They are used for sending. You send to a list in your account.</li>
<li>Lists use the standard profile and subscription centers.</li>
<li>Email address and Subscriber Key attributes are required.</li>
<li>Limited Field Types</li>
<li> Less than 500,000 Subscribers </li>
</ol>
<h4 style="text-align: left;">
Data Extension</h4>
<div style="text-align: left;">
</div>
<ol style="text-align: left;">
<li>A data extension is a flat file of data that you can relate to another data extension via AMPscript.</li>
<li>All data extensions are custom tables. They provide a flexible data model, and they tend to run faster and handle larger loads of data.</li>
<li>Data extensions can contain subscriber data, just like a list. If they contain data about subscribers and are marked as used for sending, they are called Sendable Data Extensions.</li>
<li>Data extensions can also contain other data, like purchases, web analytics, and even URLs to images that you want to display. These are called Non-Sendable Data Extensions.</li>
<li>More than 500,000 Subscribers</li>
<li>Complex Relationships</li>
<li>Triggered Sends</li>
<li>SOAP and REST APIs</li>
<li> More Field Types</li>
</ol>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Tracking</h3>
<div style="text-align: left;">
Tracking is a result of your email send. Within tracking, you can view critical elements, such as email opens, clicks, and other metrics online.</div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Send Flow</h3>
<ol style="text-align: left;">
<li><b>Properties</b>: Email, Subject Line, Send Classification, etc.</li>
<li><b>Audience</b>: Target, Exclusion, Suppression, etc. </li>
<li><b>Delivery</b>: Schedule, Send Throttling, Advanced Properties</li>
<li><b>Review</b>: Check and correct errors before sending</li>
<li><b>Increase Confidence</b>: See what you’re sending and reduce errors.</li>
</ol>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
A/B Testing</h3>
<div style="text-align: left;">
</div>
<ol style="text-align: left;">
<li>Simple tool used to optimize email campaigns.</li>
<li>Used to market test two versions of an email to two audiences.</li>
<li>Automatically splits audience, calculates winner, and can send winner to remainder.</li>
<li>Uses the email's engagement data to automatically determine and distribute the winning email.</li>
<li>Perform A/B Testing on:</li>
<li>Subject Lines, Emails, Content Areas, From Names, Send Dates and Times, Preheaders</li>
</ol>
<div style="text-align: left;">
<br /></div>
Please check this <a href="http://www.apexhours.com/introduction-to-marketing-cloud-email-studio/" target="_blank">apex hours </a>session to learn about marketing cloud email studio.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/nRhftldmmyc/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/nRhftldmmyc?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
Please share your feedback if you like this post.<br />
<br />
Thanks,<br />
Amit Chaudhary <br />
<br />
<br />
<br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com5tag:blogger.com,1999:blog-4216096443336193383.post-12528691943722302342019-11-15T21:59:00.000+05:302020-02-07T20:12:54.697+05:30Salesforce Virtual Dreamin<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmqNoTc7DB4WAm6q9PGKfOs2A_LPEUNj8iGC4xvt4sn1qE3ddLNt-T4ewhhT9xFbLgsiQqiMCQDj-dUrDsACG1_GPkthN1MICgpKpiVyEz9Fr_PcdVF4OBhZTfg_TG6KQL-kPbngkZ-K4/s1600/Color+logo+with+background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Virtual Dreamin" border="0" data-original-height="1441" data-original-width="1600" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmqNoTc7DB4WAm6q9PGKfOs2A_LPEUNj8iGC4xvt4sn1qE3ddLNt-T4ewhhT9xFbLgsiQqiMCQDj-dUrDsACG1_GPkthN1MICgpKpiVyEz9Fr_PcdVF4OBhZTfg_TG6KQL-kPbngkZ-K4/s320/Color+logo+with+background.png" title="Virtual Dreamin" width="320" /></a></div>
<br />
We are glad to announce the world first Salesforce Virtual <a href="http://virtualdreamin.com/" target="_blank">Dreamin</a> after a great success of <a href="https://www.youtube.com/channel/UChTdRj6YfwqhR_WEFepkcJw" target="_blank">Apex Hours</a>, Automation Champion and <a href="http://pathtocode.com/" target="_blank">Path To Code</a> virtual program. All these events got fantastic response from various part of globe because it can be attended by anyone from anywhere.<br />
<br />
This Idea and huge response from audience, on how convenient it is to join conference or remote meetings inspired the idea of First Salesforce Virtual Dreamin. <br />
<br />
<i><b>"Geographical location is not an obstacle anymore. Join Dreamin from anywhere on planet"</b></i><br />
<br />
Virtual Dreamin would be running for 24 hours for 2 days, so that everyone would get chance to join sessions in their timezone. Save the date MAY 16-17 2020 and follow us on <a href="http://virtualdreamin.com/" target="_blank">Virtual Dreamin </a>Website for more detail.<br />
<br />
Virtual Dreamin is focused for all audiences who wants to start or advance their career in Salesforce. All the session will focus on all below track<br />
<ol style="text-align: left;">
<li>System Admin</li>
<li>Salesforce Developer</li>
<li>Architect</li>
</ol>
<br />
FAQ<br />
<ol style="text-align: left;">
<li>What is Virtual Dreamin ? <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
This is a community driven event for community. Where we will joins lots of Virtual Salesforce sessions.</div>
</li>
<li>Who Can Attend? <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
Any one who want to become Salesforce Admin, Salesforce Developer or Salesforce Architect. </div>
</li>
<li>Why Should I Attend ? <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
You get to witness inspiring keynotes and sessions by some of the best from Salesforce.</div>
</li>
<li>How to register ? <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
Follow <a href="http://virtualdreamin.com/">http://virtualdreamin.com/</a></div>
</li>
<li>What is the registration fee ? <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<span style="color: blue;">Free</span>, Yes this is free event which you can join from your home or office. You only need one good Internet Speed.</div>
</li>
</ol>
<br />
Follow us<br />
<ol style="text-align: left;">
<li><a href="https://www.facebook.com/Virtual-Dreamin-100679304683882/" target="_blank">Facebook</a></li>
<li><a href="https://twitter.com/virtual_dreamin" target="_blank">Twitter</a></li>
</ol>
<br />
Please share your feedback and let us know what you want to learn in Virtual Dreamin<br />
<br />
<br />
Thanks,<br />
Amit Chaudhary<br />
Founder of <a href="http://www.apexhours.com/" target="_blank">ApexHours </a>and <a href="http://virtualdreamin.com/" target="_blank">Virtual Dreamin</a>.<br />
Salesforce MVP<br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com4tag:blogger.com,1999:blog-4216096443336193383.post-10253293480602807742019-11-08T20:33:00.001+05:302019-11-08T23:14:26.339+05:30Import and Export Data using SalesforceDX (SFDX)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiywUTP6ePCPc8-S03OF2MKAWwZxYuallwQ8_cs5Zzgwrn-EFMb4fgybqjMlD94uO1oZODEiF0JiArrDl2vhR7OuMgKSgFtqcWvdxdHAdW_UzTu4QvgHLn8YX7t-PYQlsDLSOsgHHxQ07k/s1600/Import+and+Export+Data+using+Salesforce+DX.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Import and Export Data using SalesforceDX (SFDX)" border="0" data-original-height="449" data-original-width="877" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiywUTP6ePCPc8-S03OF2MKAWwZxYuallwQ8_cs5Zzgwrn-EFMb4fgybqjMlD94uO1oZODEiF0JiArrDl2vhR7OuMgKSgFtqcWvdxdHAdW_UzTu4QvgHLn8YX7t-PYQlsDLSOsgHHxQ07k/s640/Import+and+Export+Data+using+Salesforce+DX.PNG" title="Import and Export Data using SalesforceDX (SFDX)" width="640" /></a></div>
<br />
<br />
In this post we will talk about Data migration using <a href="http://amitsalesforce.blogspot.com/2018/01/salesforce-dx-how-to-setup-salesforce.html" target="_blank">SalesforceDX</a>. We have a vary simple use case to Import and Export data from one Salesforce Org to another Salesforce Org. We know we can do the same with dataloader or some other custom tool. But in this post we will talk about how to import and export with SalesforceDX (SFDX). If you are new to SalesforceDx please check this <a href="https://www.youtube.com/watch?v=XP3ma4lPE_U&t=1006s" target="_blank">ApexHours Session Recording </a>by Jitender Zaa.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<h2 style="text-align: left;">
<span style="font-size: large;">How to export records with SFDX</span></h2>
<h3 style="text-align: left;">
</h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Step 1) First Login to your Salesforce Org from where you want to export data</div>
<div style="text-align: left;">
<br /></div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
sfdx force:auth:web:login --setalias myDev1</div>
<br />
<div style="text-align: left;">
Step 2) Use below command to export the data</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
To Export the data we need to use "<span style="color: blue;"><b>sfdx force:data:tree:export</b></span>" command and we need to pass one Soql query. You can also pass the path of SOQL query file with the help of -q. Lets export the Account and its all related contacts records.</div>
<div style="text-align: left;">
<br /></div>
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
sfdx force:data:tree:export -q "SELECT Id,Name,(Select FirstName,LastName from Contacts) FROM Account limit 2" -d ./data -p -u myDev1</div>
<br />
Here<br />
-q : SOQL query or file path of soql query.<br />
-d : directory, where exported json file can be saved<br />
-u : Salesforce user to perform operation<br />
-p : generate multiple sobject tree files and a plan definition file for aggregated import <br />
<br />
<br />
Once you execute above command it will create three file for you in Data Folder.<br />
<ul style="text-align: left;">
<li>Accounts.json</li>
<li>Contacts.json</li>
<li>Account-Contact-plan.json</li>
</ul>
<br />
<h2 style="text-align: left;">
<span style="font-size: large;">How to Import data using Salesforce DX</span></h2>
<br />
First login to salesforce org in which you want to import the data. Then use below command to Import records in Salesforce instance, which we just exported in previous step<br />
<br style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
sfdx force:data:tree:import -p data/Account-Contact-plan.json -u myDev1</div>
<br />
Where<br />
-f : JSON file to be imported<br />
-p : plan file <br />
-u : Salesforce user to perform operation<br />
<br />
The query for export can return a <b>maximum of 2,000 records</b>. For more information, see the REST <a href="https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm" target="_blank">API Developer Guide</a>:<br /> <br />
<br />
<b>NOTE: For above use case you don't need any scratch org. You can simply login in any sandbox and migrate your data between two org's.</b><br />
<br />
<br />
There is another Use case where we can use SalesforceDx for Import and Export Data.<br />
<br />
<b>Use Case</b>: If you are implementing Continuous Integration (<a href="http://amitsalesforce.blogspot.com/2019/01/continuous-integration-using-jenkins-with-salesforceDx.html" target="_blank">CI/CD</a>)
solution built for Salesforce, Some time you need to upload sample data
into Salesforce.<br />
<br />
<b>Solution</b>: For that you need to use <a href="http://amitsalesforce.blogspot.com/2016/08/cli-command-line-interface-salesforce.html" target="_blank">command line dataloader</a> or
custom tool built to import export data automatically. We can use SalesforceDX for data import and export as well for this requirement.<br />
<br />
<br />
<b>Related Post :</b><br />
<br />
<br />
<ul style="text-align: left;">
<li>Please check <a href="http://amitsalesforce.blogspot.com/2018/12/salesforcedx-for-non-scratch-org-SFDX.html" target="_blank">this post </a>to learn about SalesforceDx for non-scratch org.</li>
<li>Please check this post to learn about <a href="http://amitsalesforce.blogspot.com/2018/09/vs-code-for-salesforce-visual-studio.html" target="_blank">VsCode for Salesforce</a>.</li>
</ul>
<br />
<b>Further Reading</b>:<br />
<ul style="text-align: left;">
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data_example.htm">https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data_example.htm</a></li>
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data.htm">https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data.htm</a></li>
<li><a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_data.htm">https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_data.htm</a></li>
</ul>
<br />
Thanks,<br />
Amit Chaudhary<br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com0tag:blogger.com,1999:blog-4216096443336193383.post-68615586249468079542019-10-18T23:06:00.001+05:302020-07-07T21:39:36.787+05:30Lightning Message Service (LMS) | MessageChannel<div dir="ltr" style="text-align: left;" trbidi="on">
In Winter 20 Salesforce Introduce the new feature Lightning Message Service and it is generally available in <a href="https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_lc_message_channel.htm">Summer 20</a>. Lightning Message Service (LMS) allow you to communicate between Visualforce and Lightning Components (Aura and LWC both) on any Lightning page. LMS API allow you to publish message throughout the lightning experience and subscribe the same message anywhere with in lightning page. It is similar to Aura Application <a href="http://amitsalesforce.blogspot.com/2018/09/component-event-in-lightning-component.html" target="_blank">Events</a> to communication happens between components.<br />
<br />
<br />
Lightning Message Service is based on a new metadata type: <b>Lightning Message Channels</b>. We need to use Lightning Message Channel to access the Lightning Message Service API. <br />
<ol style="text-align: left;">
<li>In LWC we can access Lightning Message Channel with the scoped module <b>@salesforce/messageChannel</b>. </li>
<li>In Visualforce, we can use global variable <b>$MessageChannel</b>. </li>
<li>In Aura, use <b>lightning:messageChannel </b>in your component</li>
</ol>
<h3 style="text-align: left;">
<b> </b></h3>
<h3 style="text-align: left;">
<b>When to use Lightning Message Service.</b> </h3>
In Lightning Experience, if we want a Visualforce page to communicate
with a Lightning web component then we have to implement a custom
publish-subscribe solution because this is currently not possible with <a href="http://amitsalesforce.blogspot.com/2019/07/events-in-lightning-web-components-lwc.html" target="_blank">LWC Event</a>. Now, we can use the Lightning Message Service API to handle this communication. <br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW7dCylC0SmDm1fqtzxPXsh3Hk4nHqCWx3r-p3qipj2Je1n-bd34mH1RnzcfAM6OzD7vlkQZtiGmAMXuGwd8TmWjqjzzmk0dGghDGkfrRpJXwgYXTgjBLvOA1JMn6K-Xo_fR8Qvaeq5R4/s1600/Lightning+Message+Service+%2528LMS%2529.gif" imageanchor="1"><img alt="Lightning Message Service LMS and Message Channel" border="0" data-original-height="377" data-original-width="800" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW7dCylC0SmDm1fqtzxPXsh3Hk4nHqCWx3r-p3qipj2Je1n-bd34mH1RnzcfAM6OzD7vlkQZtiGmAMXuGwd8TmWjqjzzmk0dGghDGkfrRpJXwgYXTgjBLvOA1JMn6K-Xo_fR8Qvaeq5R4/s640/Lightning+Message+Service+%2528LMS%2529.gif" title="Lightning Message Service LMS | Message Channel" width="640" /></a></div>
<br />
<br />
Let see how we can implements this<br />
<br />
<h3 style="text-align: left;">
Create Lightning Message Channel :-</h3>
Currently we can create Lightning Message channel with Metadata <a href="https://developer.salesforce.com/docs/atlas.en-us.222.0.api_meta.meta/api_meta/meta_lightningmessagechannel.htm" target="_blank">API</a>. You can create the same with the help of VsCode. I hope you have <a href="https://www.youtube.com/watch?v=7qR0c8h5cCU" target="_blank">VsCode </a>installed in your machine if not please check <a href="http://amitsalesforce.blogspot.com/2018/09/vs-code-for-salesforce-visual-studio.html" target="_blank">this </a><a href="https://www.blogger.com/null" target="_blank">post</a>. You need to create one DX project then you need to place your message channel definition with the <b>suffix .messageChannel-meta.xml </b>in the force-app/main/default/<b>messageChannels </b>directory. like below folder structure.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBEO73zfPHtFyaZ5FKbEJpOTWwkwYwsKfesyxp46xMkxOtHDKV3cl-TYXUsERgRzvJSIi_hJ0IZ3-2Hgkcs6xTbd_tiYzD8SkUQmpKEBcPKR2Iwb3nPXF3L3mW-pApuEh-iSNk8Qym2Kc/s1600/MessageChannel.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="382" data-original-width="504" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBEO73zfPHtFyaZ5FKbEJpOTWwkwYwsKfesyxp46xMkxOtHDKV3cl-TYXUsERgRzvJSIi_hJ0IZ3-2Hgkcs6xTbd_tiYzD8SkUQmpKEBcPKR2Iwb3nPXF3L3mW-pApuEh-iSNk8Qym2Kc/s400/MessageChannel.PNG" width="400" /></a></div>
<br />
<b>MyMessageChannel.messageChannel-meta.xml</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<?xml version="1.0" encoding="UTF-8"?><br />
<LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata"><br />
<masterLabel>MyMessageChannel</masterLabel><br />
<isExposed>true</isExposed><br />
<description>This Lightning Message Channel sends information from VF to LWC</description><br />
<br />
<lightningMessageFields><br />
<fieldName>messageToSend</fieldName><br />
<description>message To Send</description><br />
</lightningMessageFields><br />
<br />
<lightningMessageFields><br />
<fieldName>sourceSystem</fieldName><br />
<description>My source?</description><br />
</lightningMessageFields><br />
<br />
</LightningMessageChannel></div>
<br />
And Package.xml should be like below<br />
<b>package.xml</b><b style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><br />
<Package xmlns="http://soap.sforce.com/2006/04/metadata"><br />
<types><br />
<members>*</members><br />
<name>LightningMessageChannel</name><br />
</types><br />
<version>47.0</version><br />
</Package></div>
Right click on LightningMessageChannel file and Deploy in Org.<br />
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Create Visualforce page and LWC</h3>
<h4 style="text-align: left;">
</h4>
<h4 style="text-align: left;">
1) LMS with Visualforce page</h4>
Salesforce introduced new <b>sforce.one APIs </b>— publish, subscribe, and unsubscribe — in Visualforce to interact with LMS (only available in Lightning).<br />
<br />
<b>LMSVisualforcePage.page</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<apex:page><br />
<br />
<div><br />
<p>Enter Your Message Here:</p><br />
<input type="text" id="theMessage" /><br />
<button onclick="publishMC()"> Publish Msg</button><br />
<br/><br/><br />
<button onclick="subscribeMC()">Subscribe</button><br />
<button onclick="unsubscribeMC()">Unsubscribe</button><br />
<br/><br />
<br/><br />
<p>Received message:</p><br />
<label id="MCMessageText"/><br />
</div><br />
<br />
<script><br />
<br />
// Load the MessageChannel token in a variable<br />
var SAMPLEMC = "{!$MessageChannel.MyMessageChannel__c}";<br />
var subscriptionToMC;<br />
<br />
function publishMC() {<br />
const message = {<br />
messageToSend: document.getElementById('theMessage').value,<br />
sourceSystem: "From VisualForce Page"<br />
};<br />
sforce.one.publish(SAMPLEMC, message);<br />
}<br />
<br />
// Display message in the textarea field<br />
function displayMessage(message) {<br />
var textLabel = document.querySelector("#MCMessageText");<br />
textLabel.innerHTML = message ? JSON.stringify(message, null, '\t') : 'no message payload';<br />
}<br />
<br />
function subscribeMC() {<br />
if (!subscriptionToMC) {<br />
subscriptionToMC = sforce.one.subscribe(SAMPLEMC, displayMessage);<br />
}<br />
}<br />
<br />
function unsubscribeMC() {<br />
if (subscriptionToMC) {<br />
sforce.one.unsubscribe(subscriptionToMC);<br />
subscriptionToMC = null;<br />
}<br />
}<br />
<br />
</script><br />
<br />
</apex:page></div>
<br />
<ul style="text-align: left;">
<li>"subscribeMC" method is used to subscribe the Message Channel with "sforce.one.subscribe(SAMPLEMC, displayMessage);"</li>
<li>"unsubscribeMC" method to unsubscribe the Message Channel with "sforce.one.unsubscribe(subscriptionToMC);"</li>
<li>"publishMC" to publish the message withe the help of "sforce.one.publish(SAMPLEMC, message);"</li>
</ul>
<br />
<h4 style="text-align: left;">
2) LMS with Lightning Web Components</h4>
<b>lMCWebComponentDemo.js</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import { LightningElement,track } from 'lwc';<br />
import { publish,subscribe,unsubscribe,createMessageContext,releaseMessageContext } from 'lightning/messageService';<br />
import SAMPLEMC from "@salesforce/messageChannel/MyMessageChannel__c";<br />
<br />
export default class LMCWebComponentDemo extends LightningElement {<br />
@track receivedMessage = '';<br />
@track myMessage = '';<br />
subscription = null;<br />
context = createMessageContext();<br />
<br />
constructor() {<br />
super();<br />
}<br />
<br />
handleChange(event) {<br />
this.myMessage = event.target.value;<br />
}<br />
<br />
publishMC() {<br />
const message = {<br />
messageToSend: this.myMessage,<br />
sourceSystem: "From LWC"<br />
};<br />
publish(this.context, SAMPLEMC, message);<br />
}<br />
<br />
subscribeMC() {<br />
if (this.subscription) {<br />
return;<br />
}<br />
this.subscription = subscribe(this.context, SAMPLEMC, (message) => {<br />
this.displayMessage(message);<br />
});<br />
}<br />
<br />
unsubscribeMC() {<br />
unsubscribe(this.subscription);<br />
this.subscription = null;<br />
}<br />
<br />
displayMessage(message) {<br />
this.receivedMessage = message ? JSON.stringify(message, null, '\t') : 'no message payload';<br />
}<br />
<br />
disconnectedCallback() {<br />
releaseMessageContext(this.context);<br />
}<br />
<br />
}</div>
<ul style="text-align: left;">
<li>First, we have to ensure that we import both the methods to interact with LMS <div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
import { publish,subscribe,unsubscribe,createMessageContext,releaseMessageContext } from '<b>lightning/messageService</b>';<br />
import SAMPLEMC from <b>"@salesforce/messageChannel/MyMessageChannel__c</b>";</div>
</li>
</ul>
<br />
<b>lMCWebComponentDemo.html</b><br />
<div class="codeblock nolang prettyprint prettyprinted" style="-webkit-text-stroke-width: 0px; background-color: whitesmoke; border-radius: 0.285714em; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.85px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 0.714286em; orphans: 2; overflow-wrap: break-word; overflow: auto; padding: 2px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-break: break-all; word-spacing: 0px;">
<template><br />
<lightning-card title="LMC Web Component" icon-name="custom:custom14"><br />
<div class="slds-m-around_medium"><br />
<p>MessageChannel: MyMessageChannel__c</p><br />
<br><br />
</div><br />
<!-- Default/basic --><br />
<div class="slds-p-around_medium lgc-bg"><br />
<lightning-input type="text" label="Enter some text" value={myMessage} onchange={handleChange}></lightning-input><br />
<lightning-button label="Publish" onclick={publishMC}></lightning-button><br />
</div><br />
<br />
<div class="slds-p-around_medium lgc-bg"><br />
<lightning-button label="Subscribe" onclick={subscribeMC}></lightning-button><br />
<lightning-button label="Unsubscribe" onclick={unsubscribeMC}></lightning-button><br />
<p>Latest Message Received</p><br />
<lightning-formatted-text value={receivedMessage}></lightning-formatted-text><br />
</div><br />
<br />
</lightning-card><br />
</template></div>
<br />
<br />
Reference:<br />
<ul style="text-align: left;">
<li><a href="https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_lc_message_channel.htm">https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_lc_message_channel.htm</a></li>
<li><a href="https://developer.salesforce.com/blogs/2019/10/lightning-message-service-developer-preview.html">https://developer.salesforce.com/blogs/2019/10/lightning-message-service-developer-preview.html</a></li>
<li><a href="https://developer.salesforce.com/docs/component-library/bundle/lightning-message-service/documentation">https://developer.salesforce.com/docs/component-library/bundle/lightning-message-service/documentation</a> </li>
</ul>
<br />
Some other related post:<br />
<ol style="text-align: left;">
<li><a href="http://amitsalesforce.blogspot.com/2019/07/events-in-lightning-web-components-lwc.html" target="_blank">Event Communication in Lightning Web Components</a></li>
<li>E<a href="http://amitsalesforce.blogspot.com/2018/09/component-event-in-lightning-component.html" target="_blank">vent Communication in Lightning Components</a></li>
<li><a href="http://amitsalesforce.blogspot.com/2018/09/vs-code-for-salesforce-visual-studio.html" target="_blank">Setup VsCode for Salesforce</a></li>
<li><a href="http://amitsalesforce.blogspot.com/2018/12/lightning-web-components-lwc-Salesforce.html" target="_blank">Lightning We Components</a></li>
</ol>
<br />
Thanks<br />
Amit Chaudhary<br />
<br />
<br /></div>
Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.com15