Skip to main content

Tutorial

Explore practical guides and implementation patterns for this topic.

Posts

Apex & Dev

Salesforce SOQL vs SOSL Explained: Queries, Relationships & Best Practices

💬 In plain words: SOQL (Salesforce Object Query Language) is used to ask precise questions about a single object and its related records. SOSL (Salesforce Object Search Language) is a broad text search across multiple, unrelated objects at the same time. When writing SOQL, remember this golden rule for relationships: query from a child to a parent using dot notation, and query from a parent to its children using a subquery. Key Points at a Glance Targeted vs. Broad: Use SOQL for filtering specific fields on a specific object tree. Use SOSL for searching a text string across many objects (like a global search). Traversing Relationships: You can travel up to 5 levels up to a parent object using dot notation (e.g., Contact.Account.Owner.Name ). You travel down to child records using subqueries. Let the Database Do the Math: Use Aggregate Queries ( COUNT , SUM , MAX ) to calculate totals in the database instead of looping through thousands of record...
Read article
Topic LWC
Lightning Web Components

How to Create Your First Lightning Web Component (LWC) in Salesforce

In plain words: Lightning Web Components (LWC) is Salesforce’s modern UI framework that relies on standard HTML, CSS, and JavaScript. To build your first component, install the Salesforce CLI, log into your org, and generate a component using sf lightning generate component --type lwc . Customize the HTML and JavaScript, make sure isExposed is true in your XML configuration, deploy it with sf project deploy start , and drag it into your Lightning App Builder page. Creating your first Lightning Web Component (LWC) might sound daunting, but once your development environment is set up, it takes less than 20 minutes. In this tutorial, we will build a simple "Hello World" card. You will learn how to accept user input, update the screen instantly without server calls, and make your component visible in Salesforce. Let's dive in!
Read article