Salesforce Developer Tips Tricks


How can we get the session ID for testing?

document.cookie.match(/(^|;\s*)sid=(.+?);/)[2]; // Uses the Chrome Developer console

How can we get the partner server URL?

URL.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/28.0/' + UserInfo.getOrganizationId()

If this for 3rd party application - partner / enterprise URL are included at the bottom of respective WSDL file you can download in Setup -> Develop -> API.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License