Compartir a través de


Configuring AIF for change tracking

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

In services and Application Integration Framework (AIF) document services, you can use change tracking to retrieve documents that have been modified, based on criteria that you specify.

Enabling change tracking

Change tracking must be enabled for the database tables that are used by the document service. For more information about how to enable change tracking, see Configuring and Managing Change Tracking.

Configuring the integration port

You can use change tracking only if the document service is exposed through an inbound enhanced integration port. To retrieve the entity keys for documents that were changed, you must expose the getChangedKeys service operation from the integration port. For information about how to expose service operations from enhanced integration ports, see Customize service contracts.

Adding filtering criteria

To add filtering criteria for change tracking, you can create document filters.

Important

You must create at least one document filter. Otherwise, no entity keys are returned from the getChangedKeys service operation.

You can create document filters when you configure an inbound enhanced integration port. For information about how to create document filters, see Configure processing options.

Using change tracking

You can use change tracking in two ways:

  • Submit an XML document to AIF that specifies the getChangedKeys action in the message header.

  • Call the getChangedKeys method on a document service class.

The response message contains a list of entity keys. These keys represent the documents that have been changed according to the criteria that you specified, such as documents that were changed after a certain date and time.

For more information about how to use change tracking in development scenarios, see AIF Document Services.