Posts

Introducing Lightning Record Picker: A New Era of Record Selection

Image
Have you ever struggled to build your own custom component for finding and selecting Salesforce records? The Winter '24 release of Salesforce introduced the  lightning-record-picker  component, a much-anticipated addition to the Lightning Web Components (LWC) toolkit. This new component addresses a longstanding challenge faced by LWC developers: the lack of a straightforward and user-friendly way to incorporate record selection functionality into their components. The  lightning-record-picker  component allows you to search for a list of Salesforce Records that match search input. It uses the GraphQL wire adapter to search for records, displays the records, and allows the user to select a record. The  lightning-record-picker  will be Generally Available (GA) in Spring ’24. In this post, let’s see how to use  lightning-record-picker  in your custom LWC components. Implementing Lightning Record Picker lightningRecordPicker.html <template> <lightning-card title="Lightni

LWC Enhancements for Developers | Winter'24 Edition

Image

5 Must-Try New Features in Salesforce Flow Winter '24

Image

New Intelligence View for Leads and Contacts in Salesforce | Winter '24

Image
Do you ever feel like you're drowning in leads and contacts? Are you struggling to keep track of which leads are active and which ones need your attention? If so, then you're not alone. The Winter '24 release of Salesforce introduces a new feature called Intelligence View for Leads and Contacts. This feature provides a centralized view of all your leads and contacts, along with useful activity metrics. This can help you to quickly identify which leads are most important and need your attention. See Which Contacts Need Attention and Take Action Directly from Contact Home Users can view contact activities, take action, and update records, all in one place in the Contact Intelligence View. Previously, Contact Home provided only simple list views and required users to navigate to individual records to take action. How to get started: To enable Intelligence View for Contacts, follow these steps: Go to Setup > Search intelligence in Quick Find Box Select Contact Intelligence

LWC Enhancements for Developers | Spring '23 Edition

Image
There are plenty of new Lightning Web Components features to get excited about in the Spring ’23 release.  Today I will share 4 essential features in Lightning Web Components that will ease our job as Salesforce developers. 1. Query DOM elements with refs Now you can use refs to access elements in shadow DOM and light DOM. Refs locate DOM elements without a selector and only query elements contained in a specified template. Previously, you could only use querySelector() to locate specific DOM elements. Before: <template> <div>My Div</div> </template> To query DOM elements in JavaScript, we use the this.template object. If we have multiple div elements in the markup, this method requires a little more code. renderedCallback() { let myDiv = this.template.querySelector('div'); } After: First, add the lwc:ref directive to your element and assign it a value. To call that reference, use this.refs. In this example, the <div> element has the directi

Handling recursion in Apex Triggers

Handling recursion in   Apex Triggers   and the best practices related to it. What is a Recursive Trigger? A recursive trigger performs an action, such as an update or insert, and then invokes itself as a result of, say, an update. How to avoid Recursive Triggers? To avoid recursion on a trigger, ensure that your trigger is only executed once. If recursion is not handled properly, you may receive the error: 'Maximum trigger depth exceeded' .

Query All Files or Notes in Salesforce

Image
Query All Files or Notes in Salesforce The new Note-taking tool uses the ContentNote object which is based on the ContentVersion (Salesforce Files) object. The Notes are related to other records like Accounts , Contacts , etc. via the ContentDocumentLink junction object. As an admin with “ Modify All Data ” and “ View All Data ” permission, you can export ContentNote and ContentVersion records that are explicitly shared with you or that you own. So what is the solution how do we export all the files and notes from an org? In order to be able to query all files, including files in non-member libraries and files in unlisted groups, you need to enable "Query All Files" permission for your backup user. This permission is disabled by default. "Query All Files" permission enables the ability to query ContentDocument and ContentVersion and retrieve all files in the org, including files in non-member libraries and files in unlisted groups. ____________________________