Category Archives : Apex

How to Delete Triggers or Classes from Production in Salesforce?

On February 16, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on How to Delete Triggers or Classes from Production in Salesforce?

Question I’m encountering some confusion with deleting components in production. I understand that you can’t delete a class directly in production—you must remove it in your sandbox and then deploy the deletion using a package. However, when I delete a trigger in my sandbox, it doesn’t show up as a…

Getting Started with Writing Code in Salesforce Developer Console

On February 16, 2025, Posted by , In Apex, With Comments Off on Getting Started with Writing Code in Salesforce Developer Console

Salesforce provides a powerful cloud-based platform for developing applications, and the Salesforce Developer Console is a built-in tool that allows developers to write, test, and debug Apex code efficiently. For those getting started with writing code in Salesforce Developer Console, this guide will provide a solid foundation. Enhance your expertise…

How to Deploy Apex Classes That Are Scheduled?

On February 15, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on How to Deploy Apex Classes That Are Scheduled?

Question How can we manage scheduled jobs in Salesforce to allow updates to the classes they reference? Specifically, is there a way to use Type.forName or other techniques to decouple classes from scheduled jobs and enable seamless deployments of Apex classes? How do we deploy Apex classes that are scheduled?…

10 Practice Problems for APEX Triggers: A Beginner’s Guide

On February 14, 2025, Posted by , In Apex,Salesforce, With Comments Off on 10 Practice Problems for APEX Triggers: A Beginner’s Guide

Apex triggers are essential tools in Salesforce development, allowing you to automate processes and create custom behaviors. Whether you’re a fresher or an experienced developer, practicing Apex trigger problems can significantly boost your understanding. In this post, I’ll walk you through 7 practice problems for Apex triggers that can help…

What is Multi-Factor Authentication (MFA) in Salesforce?

On February 14, 2025, Posted by , In Apex, With Comments Off on What is Multi-Factor Authentication (MFA) in Salesforce?

Multi-Factor Authentication (MFA) is a critical security feature in Salesforce that adds an extra layer of protection beyond just a username and password. It helps prevent unauthorized access, reduces security risks, and ensures compliance with industry regulations. In this guide, we’ll explore how MFA works in Salesforce, why it’s important,…

How to Handle Guest User CRUD/FLS in Security Review?

On February 14, 2025, Posted by , In Apex,Salesforce, By ,, , With Comments Off on How to Handle Guest User CRUD/FLS in Security Review?

Question We are developing an app for the Salesforce AppExchange that integrates with external systems. During the Salesforce Security Review, we encountered an issue related to CRUD (Create, Read, Update, Delete) and Field-Level Security (FLS) checks in Apex code. Salesforce’s security guidelines require that all Apex code performing DML operations…

Mastering Apex Code in Salesforce Development

On February 13, 2025, Posted by , In Apex,Salesforce, With Comments Off on Mastering Apex Code in Salesforce Development

Salesforce Apex is a powerful, strongly-typed, object-oriented programming language designed for developers to create custom business logic on the Salesforce platform. Whether you’re managing large datasets, automating processes, or integrating with external applications, Apex provides the flexibility and control needed to build enterprise-grade applications. Mastering Apex Code in Salesforce Development…

Unable to Share Record Access Through Apex Sharing Rules?

On February 13, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Unable to Share Record Access Through Apex Sharing Rules?

Question: Why is record sharing using Apex sharing rules failing with the error System.QueryException: List has no rows for assignment to SObject when trying to share high-priority project records from the Project__c object with a public group? The Apex sharing rule uses a custom sharing reason, Project_Sharing_Rule, and the code…

How to Convert Set for Dynamic SOQL IN Clause?

On January 31, 2025, Posted by , In Apex, With Comments Off on How to Convert Set for Dynamic SOQL IN Clause?

Question: When working with dynamic SOQL in Salesforce, I often need to include a Set<Id> in an IN clause. However, Set<Id> cannot be used directly in a dynamic query string. To accomplish this, I need to convert the set into a properly formatted string, like this: My current approach involves…

Writing Test Classes for Invocable and @Future Apex Methods

On January 26, 2025, Posted by , In Apex, With Comments Off on Writing Test Classes for Invocable and @Future Apex Methods

Question How Can I Write Test Classes for an Invocable Apex Class and an @Future Callout Class? I am new to Apex and eager to learn. I have two classes that work as intended, but I am struggling to create test classes for them since I have never written test…