Blog For Developers

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);
Posted by karthik at 02:04 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

About Me

My photo
karthik
View my complete profile

Force.com Certified Developer

Force.com Certified Developer

Blog Archive

  • ►  2020 (12)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
    • ►  June (1)
    • ►  April (3)
    • ►  March (1)
    • ►  February (2)
    • ►  January (1)
  • ►  2019 (3)
    • ►  July (1)
    • ►  April (2)
  • ▼  2018 (3)
    • ►  October (1)
    • ▼  August (1)
      • Get Base URL in Apex code.
    • ►  March (1)
  • ►  2017 (2)
    • ►  December (1)
    • ►  July (1)
  • ►  2016 (4)
    • ►  October (2)
    • ►  July (2)
  • ►  2015 (3)
    • ►  December (3)
  • ►  2014 (18)
    • ►  October (12)
    • ►  August (1)
    • ►  April (3)
    • ►  February (2)
  • ►  2013 (16)
    • ►  December (2)
    • ►  November (4)
    • ►  October (9)
    • ►  September (1)

Total Pageviews

Simple theme. Theme images by luoman. Powered by Blogger.