(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

How to Add a Dynamic Child List to Parent in Apex Class || Trigger using map

A - Z Guide to Using the Wire Decorator in LWC Salesforce