I'd like to have an idea on how to compare data in Sitecore that was created by Data Exchange Framework using Dynamic CRM Connect during Synchronization. I'd like to do this by running the Synchronization and based on that compare I will do some custom changes like deleting the sitecore item if it doesn't exist already in CRM Entity.

Thanks in advance.

  • Hi Jovit. Can you explain a little more. Are you trying to delete records in Sitecore that are not in the CRM? Are you asking how to delete records? Are you asking how to read the CRM data?
    – RReilley
    Commented Oct 24, 2017 at 13:51

1 Answer 1


It's not clear to me exactly what you are trying to do, but it sounds like you ran a process to read data from CRM and write that data to Sitecore. Some of that data no longer exists in CRM, so you want to remove the data from Sitecore in order to keep CRM and Sitecore in sync.

If this is what you want to accomplish, the first thing you need to do is to determine what data is in Sitecore that is no longer in CRM. This is probably easiest done by the following:

  1. Read data from CRM
  2. Write the data from CRM to a temporary storage location (like a database temporary table)
  3. Loop through the data in Sitecore
  4. If the data in Sitecore does not also exists in the temporary storage location, delete the data from Sitecore

We decided to err on the side of caution with respect to deleting data: we don't do it. We give you the tools needed to implement the appropriate logic for your requirements.

In future versions we will provide better support for this sort of scenario, specifically having access to a temporary storage area and patterns that demonstrate how to incorporate that into a sync process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.