Skinny tables in Salesforce
Amit Blog 4Salesforce
by
3y ago
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. What is the Skinny table? 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 t ..read more
Visit website
Polymorphic Relationships in SOQL Queries : TYPEOF
Amit Blog 4Salesforce
by
3y ago
 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.  Relationship field and Polymorphic field Let understand the different between Relationship field and Polymorphic field Relationship field Polymorphic field  OwnerId field of the Account and contact object. Most of the Lookup and master-detail fields.     OwnerId field of the event Object. It can be ..read more
Visit website
Lightning Datatable Sorting in Lightning Web Components
Amit Blog 4Salesforce
by
4y ago
Last time 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 onsort attribute in datatable. Lightning-datatable 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.  Use onsort event handler to update the table with t ..read more
Visit website
Modal/Popup in Lightning Web Component (LWC)
Amit Blog 4Salesforce
by
4y ago
In this post we will talk about how to create modal/Popup in Lightning web Component (LWC). Currently "lightning:overlayLib" 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. If you want to know how to create Modal in Lightning aura component, please refer to this post. Modal / Popup Example Lightning Web component(LWC) You can take a help from SLDS for crea ..read more
Visit website
Share Custom labels between Lightning Web Components
Amit Blog 4Salesforce
by
4y ago
We know how to use 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. 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. Step 1) Create Utility Class. Create a Lightning web component that c ..read more
Visit website
Custom Label in Lightning Web Components (LWC)
Amit Blog 4Salesforce
by
4y ago
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 multilingual applications. Let see how to access custom Label in Lightning Web Components. To import a label in a Lightning Web Component, use @salesforce/label in an import statement import labelName from '@salesforce/label/label-reference'; labelName: It is name that refers to the label in LWC. labelReference: The name of the label in your org. Custo ..read more
Visit website
Code Layout and Formatting
Amit Blog 4Salesforce
by
4y ago
In our last 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. Different teams and projects may have different standards and when contributing to a project, you should follow your team and company standards. I have listed a few guidelines for Salesforce Developer to format the code:- Code Comments Best Practices: When any developer look into your code he should understand what is goi ..read more
Visit website
Lazy loading in Lightning Web Component
Amit Blog 4Salesforce
by
4y ago
 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 (enable-infinite-loading) enables you to load a subset of data and then load more data when users scroll to the end of the table. In this post we will learn about lightning datatable attributes enable-infinite-loading and load more offset. enable-infinite-loading : You can load a subset of data and then display more when users scroll to the end of the table. Use with the onl ..read more
Visit website
Salesforce Naming Conventions Best Practices
Amit Blog 4Salesforce
by
4y ago
In this post we will talk about Salesforce naming conventions best practices and how to write a clean code. 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. A well formatted code increases readability, understanding and ultimately maintainability of the code base. Before staring with naming convention lets talk about What is PascalCase, camelCase, SNAKE_CASE ? cam ..read more
Visit website
Navigation Service in Lightning Web Components | Mixin
Amit Blog 4Salesforce
by
4y ago
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. A PageReference is a JavaScript object that describes the page type, its attributes, and the state of the page. Step 1) Import lightning/navigation import { NavigationMixin } from 'lightning/navigation'; Step 2) Apply the NavigationMixin function to your component’s base class. export default class MyCustomElement extends NavigationM ..read more
Visit website

Follow Amit Blog 4Salesforce on FeedSpot

Continue with Google
Continue with Apple
OR