RetrieveVersion Message (CrmService)
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
| Works for all deployment types | Works online and offline |
Retrieves the version number of the Microsoft Dynamics CRM server.
The relevant classes are specified in the following table.
| Type | Class |
| Request | RetrieveVersionRequest |
| Response | RetrieveVersionResponse |
Remarks
To use this message, pass an instance of the RetrieveVersionRequest class as the request parameter in the Execute method.
To perform this action, the caller must have access rights on the system user (user) entity instance. For a list of required privileges, see RetrieveUserSettingsSystemUser Privileges.
Example
The following code example shows how to use the RetrieveVersion message.
[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Retrieve the version of Microsoft Dynamics CRM.
RetrieveVersionRequest request = new RetrieveVersionRequest();
RetrieveVersionResponse response = (RetrieveVersionResponse) Service.Execute(request);
string version = response.Version;
[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle"
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx"
service.CrmAuthenticationTokenValue = token
service.Credentials = System.Net.CredentialCache.DefaultCredentials
' Retrieve the version of Microsoft Dynamics CRM.
Dim request As New RetrieveVersionRequest()
Dim response As RetrieveVersionResponse = CType(Service.Execute(request), RetrieveVersionResponse)
Dim version As String = response.Version
See Also
Concepts
Reference
.gif)