Understand the error – System.QueryException: List has no rows for assignment to SObject

Description This issue you may encounter in apex class if you have query like this: The following query is not returning any number of records: Lead l = [SELECT Id FROM Lead WHERE Id = : recordId]; The error “List has no rows for assignment to SObject” occurs when query doesn’t return any rows. Possible Reason …

Understand the error – System.QueryException: List has no rows for assignment to SObject Read More »

Locate metadata references using the Salesforce Dependency API.

When working on enhancements or user stories for the Salesforce application, we often introduce numerous new features. Before making modifications to the existing system, it is crucial to analyze the objects that are being referenced. Identifying these referenced objects is not always straightforward. Salesforce has addressed this challenge by introducing a new object called MetadataComponentDependency …

Locate metadata references using the Salesforce Dependency API. Read More »

Implementing force:refreshView (getRecordNotifyChange) within a Lightning web component.

We have a strong appreciation for the Lightning UI and the aura feature (e.force:refreshView) that efficiently refreshed data on the current Lightning page, record, or component. We found this functionality lacking in LWC, and observed that many resorted to a workaround involving a combination of Aura and LWC to achieve this. However, with the advent …

Implementing force:refreshView (getRecordNotifyChange) within a Lightning web component. Read More »

Best Practices and Considerations for Lightning Web Components (LWC)

Hello again! This blog post will be unique as I will continuously update it with the latest discoveries. In this blog post, I will discuss best practices and considerations related to LWC, drawing from my experience both with Salesforce and personally. Let’s begin with the topic of FOR LOOPS. JavaScript ES6 introduced various types of …

Best Practices and Considerations for Lightning Web Components (LWC) Read More »

Best Practices and Considerations for Lightning Web Components (LWC)

Hello again! This blog post will have a unique format as I’ll continually update it with the latest insights. In this blog post, I’ll be discussing best practices and considerations related to LWC, drawing from my own personal experiences in addition to Salesforce recommendations. To begin, let’s dive into the topic of FOR LOOPS. 1.Working …

Best Practices and Considerations for Lightning Web Components (LWC) Read More »