Just noticed the behavior of Data Exchange Framework that it does not delete the records that is already created in Sitecore upon Synchronization and run Sync again after deleting a record in CRM. Is this something that need to be done as a custom provider? Or is there already an out of the box pipeline on Data Exchange Framework ready for Synchronizing Deleted records.
-
what entity from CRM you want to syncronize? What CRM are you using ?– Vlad IobagiuOct 16, 2017 at 7:25
-
I am using the "account" entity.– Jovit MayoOct 16, 2017 at 7:35
-
and you create items on Sitecore or contacts in xDB?– Vlad IobagiuOct 16, 2017 at 7:41
-
I created the items in Sitecore. Mapped into one of my Template.– Jovit MayoOct 16, 2017 at 7:43
-
Do you have an identifier in your account object?– Artem PrashkovichOct 16, 2017 at 12:19
1 Answer
Unfortunately Dynamics CRM cannot send request to Sitecore to notify that entity was deleted. You can add a custom solution like "Clean Up Sync" pipeline batch to send a request to determine whether Dynamics Crm Entity exists by Sitecore record Id, if no remove record.
Option 1
Read Sitecore Records Pipeline:
- Get All Sitecore Records Step
- Iterate Step -> [Clean Up Records Pipeline]
Clean Up Records Pipeline:
- Find Dynamics Entity By Record Id Step
- Remove Sitecore Record if not found Step
Option 2
Read Sitecore Records Pipeline:
- Create Queue Step
- Get All Sitecore Records Step
- Iterate Step -> [Resolve Records Pipeline]
- Remove Bulk Records in Queue Step
Resolve Records Pipeline:
- Find Dynamics Entity By Record Id Step
- Add Record to the Queue If Not Found Step
Follow this example you can add one more Clean Up Sync but for the records which were removed from Sitecore.
-
Thanks for the idea @Vlad Sphak. I did the option 1 you've mentioned in my problem. Thanks a lot. :) Nov 3, 2017 at 6:14