Salesforce

Distribute JavaScript Code within a Lightning Web Component for Accessing URL Parameters

In this article, we’ll craft a Lightning Web Component intended for sharing as a JavaScript library among other LWCs. We’ll create an LWC Component serving as a utility method for extracting query parameters, demonstrated below: As observed in the code above, all that’s required is the creation of a JavaScript file and a metadata file …

Distribute JavaScript Code within a Lightning Web Component for Accessing URL Parameters Read More »

Utilizing SalesforceDX (SFDX) in conjunction with non-Scratch Orgs.

We’ve reviewed several blog entries regarding SFDX and its functionalities before. In this post, I’ll outline the process of utilizing SFDX with Developer, Sandbox, or Production Orgs. Essentially, we’ll cover the utilization of SFDX with non-Scratch Orgs. Our tool of choice will be the official Salesforce IDE for SFDX, namely VSCode. Assuming you’ve already installed …

Utilizing SalesforceDX (SFDX) in conjunction with non-Scratch Orgs. Read More »

Automate for Success: Elevate Your Salesforce Development with Task.json

How often do you find yourself Googling your preferred Salesforce DX Commands? Have you encountered situations in previous projects where you couldn’t easily recall or access the commands needed for deployment automation? For quite some time, I’ve relied on Task.json within VSCode to: Consistently, I’ve implemented a standardized Task.json across all my projects, regularly updating …

Automate for Success: Elevate Your Salesforce Development with Task.json Read More »

Implementing Salesforce’s Web-to-Lead and Web-to-Case functionality with JavaScript while ensuring CORS compatibility.

Have you encountered CORS problems when embedding Web-to-Lead or Web-to-Case forms on your website? Cross-Origin Resource Sharing Cross-Origin Resource Sharing (CORS) involves an HTTP header mechanism enabling a server to specify origins (domains, schemes, or ports) other than its own from which a browser can load resources. CORS errors arise when a server doesn’t provide …

Implementing Salesforce’s Web-to-Lead and Web-to-Case functionality with JavaScript while ensuring CORS compatibility. Read More »

Retrieve the first element from a SET using Apex

Greetings, Trailblazers, You’re likely aware of the distinction between LIST and SET in Apex. You might be curious about accessing the first (or any) element of a SET without iterating. Through iteration, this can be easily accomplished. Without the need for iteration – Here’s a straightforward technique, #EnjoyLearning #ContinuousLearning

Use force:refreshView (or getRecordNotifyChange) in a Lightning web component.

We have a strong appreciation for the Lightning UI and the aura feature (e.force:refreshview), which updates the data on the current Lightning page, record, or component. However, we found that this feature was missing in LWC, and many resorted to using a combination of Aura and LWC to achieve this functionality. As of Winter ’21, …

Use force:refreshView (or getRecordNotifyChange) in a Lightning web component. Read More »

Best Practices and Considerations for Lightning Web Components (LWC).

Hello again! This blog post takes a unique approach as it will continuously receive updates with the latest findings. I will be sharing best practices and considerations related to LWC, drawing from both Salesforce guidelines and personal experiences. Let’s begin with the topic of FOR LOOPS. 1- FOR LOOPS JavaScript ES6 introduces a distinct type …

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

Retrieve the values of Object and Field Labels using API Names.

This scenario frequently arises when you possess the API Name but require the current labels for your object or field, whether it’s custom or standard. While you usually have this information in advance, there are instances where it becomes necessary when dynamically composing your Apex. Presented here is a straightforward method that takes API Names …

Retrieve the values of Object and Field Labels using API Names. Read More »