RetrieveDeprovisionedLanguages Message (CrmService)
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
| Works for all deployment types | Works online only |
Retrieves the list of language packs installed on the server that have been disabled.
The relevant classes are specified in the following table.
| Type | Class |
| Request | RetrieveDeprovisionedLanguagesRequest |
| Response | RetrieveDeprovisionedLanguagesResponse |
Remarks
To use this message, pass an instance of the RetrieveDeprovisionedLanguagesRequest class as the request parameter in the Execute method.
For a list of required privileges, see RetrieveDeprovisionedLanguages Privileges.
Example
The following code example shows how to use the RetrieveDeprovisionedLanguages 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 Lanugage Codes for language packs installed on the server that are disabled.
RetrieveDeprovisionedLanguagesRequest request = new RetrieveDeprovisionedLanguagesRequest();
RetrieveDeprovisionedLanguagesResponse response = (RetrieveDeprovisionedLanguagesResponse)Service.Execute(request);
// Create a CultureInfo array representing the installed but disabled languages.
System.Globalization.CultureInfo[] cultures =
new System.Globalization.CultureInfo[response.RetrieveDeprovisionedLanguages.Length];
for (int i = 0; i < response.RetrieveDeprovisionedLanguages.Length; i++)
{
cultures[i] = System.Globalization.CultureInfo.GetCultureInfo(response.RetrieveDeprovisionedLanguages[i]);
}
[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 Locale IDs from server. Dim request As New RetrieveDeprovisionedLanguagesRequest() Dim response As RetrieveDeprovisionedLanguagesResponse = CType(Service.Execute(request), RetrieveDeprovisionedLanguagesResponse) ' Create a CultureInfo array representing the available languages. Dim cultures(response.RetrieveDeprovisionedLanguages.Length - 1) As System.Globalization.CultureInfo For i As Integer = 0 To response.RetrieveDeprovisionedLanguages.Length - 1 cultures(i) = System.Globalization.CultureInfo.GetCultureInfo(response.RetrieveDeprovisionedLanguages(i)) Next i
See Also
Concepts
Reference
© 2010 Microsoft Corporation. All rights reserved.
