Get the CRM Version RetrieveVersionRequest

Hi,

One of the good feature in CRM 2015 Update 1 is we can write the code to get the version of CRM.

Here is the code of it

var verRequest = new RetrieveVersionRequest();
RetrieveVersionResponse verResponse = (RetrieveVersionResponse)objService.Execute(verRequest);
var crmVersion = new Version(verResponse.Version);
if (crmVersion >= new Version(“7.1”))
{
      // Code
}
else
{
      // Code
}

Get the latest dlls from SDK for accessing “RetrieveVersionRequest” message.

Get Latest SDK

Hope it helps


Happy CRM’ing
Gopinath.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s