(Salesforce Apex 2024 Release) getSalesforceBaseUrl method is deprecated

 

The getSalesforceBaseUrl() method is no longer available and deprecated in API versions 59.0 and beyond. Alternatively, use getCurrentRequestUrl() to obtain the URL of a complete request on a Salesforce instance, or getOrgDomainUrl() to obtain your organization's URL. A compilation error occurs when the deprecated method in API version 59.0 and later is attempted to be used.

System.debug(URL.getOrgDomainUrl());

Comments

Popular posts from this blog

Understanding the Salesforce Approval Process: A Step-by-Step Guide

How to Give Permissions to Automated Process Users or System Context Users

Salesforce Custom Settings: Optimizing Your CRM for Maximum Efficiency