Export (0) Print
Expand All
Expand Minimize

RetrieveDeprovisionedLanguages Message (CrmService)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Works for all deployment typesWorks 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.

TypeClass
RequestRetrieveDeprovisionedLanguagesRequest
ResponseRetrieveDeprovisionedLanguagesResponse

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.


Show:
© 2015 Microsoft