How to upsert using External Id using Salesforce Apex?
Upsert uses the sObject record's primary key (the ID), an idLookup field, or an external ID field to determine whether it should create a new record or update an existing ....
Upsert uses the sObject record's primary key (the ID), an idLookup field, or an external ID field to determine whether it should create a new record or update an existing ....
Using Pattern.matches() and RegEx, we can validate Phone Number or Mobile Number using Apex in Salesforce. In the following example, I have made sure the Account Phone number field contains ....
SOQL Injection can occur in Apex code whenever your application relies on end user input to construct a dynamic SOQL statement and you do not handle the input properly. To ....
Sample Code: List < Schema.SObjectType > gd = Schema.getGlobalDescribe().Values(); Map<String , Schema.SObjectType > globalDescription = Schema.getGlobalDescribe(); for ( Schema.SObjectType f : gd ) ....
We can query or we can use getInstance() to get the value and then we can use update DML Operation to update the Custom Settings value. Please check the following ....
To Set Up Test Data for an Entire Test Class in Salesforce, @testSetup is used. Sample Test Class: @isTest private class CommonTestSetup { /* Method to setup data */ ....
To set From Address for sending emails using Apex, you have to set Organization-Wide Email Address and use setOrgWideEmailAddressId. 1. Go to Email Administration --> Organization-Wide Addresses. 2. Click "Add" button. 3. ....
getTime() in Salesforce is used to get milliseconds from a Datetime. Sample Code: DateTime maxTime = System.now().addMinutes(5); DateTime minTime = System.now(); system.debug('Milliseconds Difference is ' + (maxTime.getTime() - minTime.getTime())); system.debug('Seconds ....
Dynamic memory allocation which is also known as heap-based memory allocation is the allocation of memory storage for use in a computer program during the run time of that program. ....
1. Constructor of the controller. 2. Action method of the page. 3. Getter methods. 4. If there are any client-side technologies on the page, such as JavaScript, the browser executes them. ....