This documentation is archived and is not being maintained.

Monitoring the Import Progress

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

To monitor the progress of the import, run the import operation on the main thread by using one of the following messages:

Query the results of the import on the second thread, in a loop with a Sleep delay (1 second) between each call.


The following sample shows how to calculate the percentage of completed blocks during import.

// Calculate the total number of blocks and the processed number of blocks.
var oDataXml = loadXmlDocument(;
var oAllNodes = oDataXml.selectNodes("//entity | //node | //setting | //securityrole | //workflow "); 
var oCompletedNodes = oDataXml.selectNodes("//entity[@result] | //node[@result] | //setting[@result] | //securityrole[@result] | //workflow[@result]");
iTotalBlocks = oAllNodes.length;
iTotalProcessed = oCompletedNodes.length;

var iPercentage = iTotalProcessed *100 /iTotalBlocks;

See Also

Other Resources

© 2010 Microsoft Corporation. All rights reserved.