This documentation is archived and is not being maintained.

RetrieveParsedDataImportFile 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 data from the parse table.

The relevant classes are specified in the following table.

Optional ParametersRequestIdOptionalParameter


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

To perform this action, the caller must have access rights on the import file entity instance. For a list of required privileges, see RetrieveParsedDataImportFile Privileges.

You have to pass a unique identifier of the associated import file in the ImportFileId property of this request.

The parsed data is returned in a two-dimensional array of strings in the Values property of the message response. The data is returned with the same column order as the column order in the source file.

Use this message only after you have created a parse table by using the ParseImport message.

Do not use this message after you use the ImportRecordsImport message. You cannot access the parse table after the import job submitted by the ImportRecordsMessage message has finished running.


The following sample code shows how to use the RetrieveParsedDataImportFile message. For a complete sample, download the SDK sample code and look at SDK\Server\FullSample\DataMigration.

// 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 data from the parse table.
// Note: You must create the parse table first using the ParseImport message.
// The parse table is not accessible after ImportRecordsImportResponse is called.
RetrieveParsedDataImportFileRequest parsedDataRequest = new RetrieveParsedDataImportFileRequest();
parsedDataRequest.ImportFileId = new Guid("1DCDEE97-35BB-44BE-8353-58BC36592656");
parsedDataRequest.PagingInfo = new PagingInfo();

// Specify the number of entity instances returned per page.
parsedDataRequest.PagingInfo.Count = 2;

// Specify the number of pages returned from the query.
parsedDataRequest.PagingInfo.PageNumber = 1;

// Specify a total number of entity instances returned.
parsedDataRequest.PagingInfo.PagingCookie = "1";

RetrieveParsedDataImportFileResponse parsedDataResponse = (RetrieveParsedDataImportFileResponse)service.Execute(parsedDataRequest);

// Output the first two rows retrieved.
int rowCount = 1;
foreach(string[] rows in parsedDataResponse.Values)
   int colCount = 1;
   foreach(string column in rows)
      Console.WriteLine("(" + rowCount.ToString() + "," + colCount.ToString() + ") = " + column);

See Also



© 2010 Microsoft Corporation. All rights reserved.