Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

How to get the Salesforce Instance Server URL from APEX Class

Be First!
by February 27, 2013 APEX, SALESFORCE

How to get the Salesforce Instance Server URL from APEX Class?

This can be used to get the ID of current record.


ApexPages.CurrentPage().getParameters().get('id');

This can be used to get the current host in the url for e.g: “cs8.salesforce.com”.


ApexPages.CurrentPage().getHeaders().get('host');

(713)

Previous
Next

Leave a Reply