Friday, 17 August 2018

Get Base URL in Apex code.


How to Base URL in the apex code.

Step 1: Login into salesforce account.
Step 2: Open Developer console and paste below code and execute.

Code:

String baseUrl = System.URL.getSalesforceBaseUrl().toExternalForm();
System.debug('baseUrl*****' + baseUrl);

No comments:

Post a Comment