ExportAllXml Message (CrmService)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Works for all deployment types Works online only

Export all customizations to an XML file.

The relevant classes are specified in the following table.

Type Class
Request ExportAllXmlRequest
Response ExportAllXmlResponse

Remarks

To use this message, pass an instance of the ExportAllXmlRequest class as the request parameter in the Execute method.

For a list of required privileges, see ExportAllXml Privileges.

Example

The following code example demonstrates how to use the ExportAllXml 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;

// Create the request.
ExportAllXmlRequest request = new ExportAllXmlRequest();

// Execute the request.
ExportAllXmlResponse response = (ExportAllXmlResponse)service.Execute(request);

// Load the results into an XML document.
XmlDocument entityXml = new XmlDocument();
entityXml.LoadXml(response.ExportXml);

[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

' Create the request.
Dim request As New ExportAllXmlRequest()

' Execute the request.
Dim response As ExportAllXmlResponse = CType(service.Execute(request), ExportAllXmlResponse)

' Load the results into an XML document.
Dim entityXml As New XmlDocument()
entityXml.LoadXml(response.ExportXml)

See Also

Concepts

Reference

© 2010 Microsoft Corporation. All rights reserved.