RSS

CRM 2013 – How to get Server URL in SOAP or REST ?

03 Dec

Introduction

This blog is simply explains the trick for getting the Server URL for SOAP Endpoint or REST Endpoint from the Context.

In CRM 2011

We were using following two lines of code to get Server URL.

var context = GetGlobalContext();
serverUrl = context.getServerUrl();

Now in CRM 2013

getClientUrl() will be supported instead of getServerUrl().

var context = GetGlobalContext();
clientUrl = context.getClientUrl();

By Anish Thakur
Senior Software Engineer @Team DynamicsCRM.
Mindfire Solutions

Advertisements
 
 

Tags: , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: