Retrieving and Updating State Information
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
Monitoring and updating the state of an asynchronous operation is typically done by using System Jobs in the Microsoft Dynamics CRM Web application. However, you can also use the SDK to write code that performs those same tasks.
The typical scenario for reading the state of an asynchronous operation is as follows:
- Retrieve an asyncoperation by name using the RetrieveMultiple method or by ID using the Retrieve method.
- Read the statecode property.
You can then optionally change the statecode as follows:
- Modify the retrieved statecode property to a new value according to the allowed operation states. You could also change the postponeuntil property.
- Call Update to change the value of those attributes in the database.
The previous operations can also be performed by using the Execute method with the appropriate request messages. Attributes of asyncoperation other than statecode and postponeuntil should be considered read-only.
© 2010 Microsoft Corporation. All rights reserved.