function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ManoharSFManoharSF 

get endpoint URL

Hi there,

 

How can I get the  endpoint URL? I tried to use RestRequest.getendpoint() but  I get "Method does not exist or incorrect signature: [RestRequest].getEndpoint()"

 

I am trying to use that for a router logic ie to check if the URL contain certain text then insert into some object otherwise some other object.

 

 

Any help is grealy appreciated.

 

Thanks

Manohar

 

hitesh90hitesh90

Hi Manohar,

 

You can get endpoint URL using following method.

 

String strEndpointurl = URL.getSalesforceBaseUrl().toExternalForm();

Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

 

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/

ManoharSFManoharSF

Hi Hitesh,

 

Thanks for that. In my case Salesforce is destination and Source is external system and I am looking for the external System URL (Source). I am using HTTPPost.

 

 

Thanks

Manohar