QUESTION I need to be able to check if an org has Person Accounts enabled via Apex Code as part of package. What’s the best way to do this without making the package require Person Accounts be enabled in any org in which it’s… Read More »What is the most effective method to verify if person accounts are enabled through Apex Code?
Question How can we know State and Country Picklist is enabled in the Salesforce org or not using Apex code SOLUTION When you enable that feature SFDC creates a countryCode field for each object where the address exists. Then you… Read More »How can we know State and Country Picklist is enabled or not in an org using Apex Code
Description This article gives you sample code to access the state and country pick-list values if it is enabled in your Salesforce org. Solution Makes sure the state and country picklist is enabled in the ORG. 1. Following is the… Read More »How To Access Country & State Picklist Values In Apex
What do triggers entail “Triggers in Apex can be activated to initiate custom actions either prior to or following modifications to Salesforce records, including inserts, updates, or deletions.” What categories of triggers exist in Salesforce There are two trigger categories… Read More »What do Apex Triggers represent in Salesforce?| Insights from the Developer Guide
Create a new article Publish a draft Article Set a schedule for archiving a published article “Please be aware that if the scheduledDate is left blank or set as null, the article will be archived right away.” Abort the scheduled… Read More »Manage Article in Salesforce using Apex
Salesforce stores the comment in object called – ProcessInstanceStep. So you can query like this:
The System.TriggerOperation enum has the following values: The new Trigger context variable Trigger.operationType will return System.TriggerOperation enum during trigger context. If you combine this new context variable and the new Apex switch feature, trigger code becomes much easy to implement and understand. An Example of Using… Read More »Enum for Salesforce Apex Trigger Operations
INTRODUCTION Today, we will discuss the Database.Stateful interface, which plays a crucial role in maintaining state across batch call methods. When working with the Database.Stateful interface, instance member variables of a class retain their values between transactions of the execute()… Read More »How can we maintain state across batches in apex
Here is a concise one-liner of code
Select Domain FROM domain The Domain object is related to Site.com, which will not return org domain. So what is workaround? Here is below code snippet.