Convert DateTime to a Date format in Apex
OPTION 1: Create a date newInstance() and pass the Year, Month and Day from the dateTime. OPTION 2: Get date from the DateTime using Date() method.
OPTION 1: Create a date newInstance() and pass the Year, Month and Day from the dateTime. OPTION 2: Get date from the DateTime using Date() method.
Generate a fresh article. Release a draft article. Withdraw a published article. Arrange the archival of a published article. Please note that if the scheduledDate provided is null, the article will be archived immediately. Revoke the scheduled archival of a published article: Remove an article from the archive: Erase a draft article: Generate a draft …
INTERNAL USER EXTERNAL USER OR COMMUNITY USER
In Salesforce, you can set the “From” address in a SingleEmailMessage by using the setOrgWideEmailAddressId method. Here’s an example of how you can set the “From” address: Make sure to replace [OrgWideEmailAddressId] with the actual Organization-Wide Email Address ID that you want to use as the “From” address. The Organization-Wide Email Address must be previously …
Setting From Address in Single Email Message in Salesforce Read More »
To retrieve records in Salesforce using a curl request in Apex, you would need to make use of Salesforce’s REST API. Assuming you are well aware of HTTP requests, REST Api and cURL; Here’s an example of how you can construct a curl request in Apex to retrieve records: In this example, we are constructing …
Using cURL in apex to retrieve the records in Salesforce Read More »
INTRODUCTION The objects ‘SandboxInfo’ and ‘SandboxProcess,’ are available in API v35 or higher, and allow you to create and refresh sandboxes. Tolloing api can be used to create or refresh the sandbox. SandboxInfoRepresents a sandbox. SandboxInfo enqueues a sandbox for creation or for being refreshed. To learn more please review the Force.com Tooling API SandboxInfo section. SandboxProcessRepresents …
How can we refresh or create Sandbox using API in Salesforce Read More »
Introduction This error is thrown while sending email using apex if you are setting User Id in target recipient: setTargetObjectId(usr.Id) and also specifying target record id as: setWhatId(opp.Id). As per Salesforce documentation if you are passing record id in WhatId then you can only pass Contact Id in setTargetObjectId. Here is Salesforce article: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_email_outbound_single.htm Workaround
NOTE method The first parameter of that function call is the actual id of the user object. User Ids start with 005 and are 15 or 18 characters long and second parameter is password string. Complex password generation TIPS
Method 1 Method 2
What is compound field? Compound field – for example Address and Geolocation – binds together multiple information into a single unit. Like Address is one unit of information but actually it is comprises of different primitive information like Street Address, City, State, Country & Postal Code. Can we query/access address field without addressing individual field …
How to access Compound field values in Apex Salesforce Read More »