Hi- we have a bulk-record deletion job set up to delete all the records in our Orders entity every night at 11:30pm. This is part of a nightly reload we perform to repopulate the Orders entity with new records. The owner of this job is a co-worker we'll call Tom. Our Sales Reps have begun to notice random Call Reports they have composed are now missing from the system. They even have emails with links to the Call Report that return a 'Record not available' when you open it, so they are definitely gone. Looking at the Audit logs, sorting by the Call Report entity, I've found that Tom has been deleting these Call Reports shortly after 11:30pm. He obviously hasn't been doing this himself so I'm assuming it is related to the deletion job, even though it only queries the Order entity. As I said, the Call Reports that are deleted are fairly random. It only appears to occur every few weeks even though the job runs every night. It typically only deletes one record, but I have a few examples where two were deleted in one evening (both had the same owner interestingly enough). We do not have any other deletion jobs scheduled either that could be causing it. Any ideas on what might be causing this?
*This post is locked for comments
Hi,
you are right, if the call report only was linked to the account, this shouldn't have been deleted by your bulk deletion job.
How often does this deletion happen? You could probably perform some spot checks, if call reports linked to orders exist in the system via advanced find.
Reg. my proposal to change the search criteria for your bulk deletion job, well this will be quite tricky. Because in advanced find by default you could only search for orders with a related call ceport (related --> call report --> call report contains data).
But you can't exclude these records.
In the following post a solution for that has been described (manipulating the fetch XML):
community.dynamics.com/.../187457
So you could create an advanced view for that and run the bulk deletion job based on this saved view.
Hth Thomas
I checked with the person who composed a Call Report that was deleted and he tells me he created it via the Account record directly in CRM online. This Account also has orders that we have pulled in from an outside source (again, we purge and re-build orders nightly). It's very unclear to me why a Call Report at an Account would be deleted when Orders are purged.
Hi,
ok then there's no way to change that behaviour. So I would change the search criteria in the bulk deletion to exclude orders, which are linked to a call report.
Reg. "I would like to point out ...", are these call reports linked to accounts and orders, or only to accounts. If they are linked via the regarding object field, then they are only linked to one entity. So that's the readon they won't be touched when you delete orders.
Hth Thomas
Thank you for responding. Call Report is an out of box entity, but we actually use a custom entity for Orders. I'm not sure why we set things up like this. Call Reports are only generated off of Accounts, Contacts and Opportunities. Sales Reps can't build them from an order. Orders and Call Reports are both linked to Accounts. That is the only connection I see them having.
Like I mentioned, I can change the type of behavior to Configurable Cascading. I can then adjust Assign, Share, Unshare, and Reparent, but not Delete or Merge. Below is a screenshot of the options when I change to Configurable Cascading. I'd also like to point out that we pull down many orders every night into the Orders entity that are linked to Accounts with Call Reports attached without any deletions occuring so this makes even less sense!
Thanks again for the assistance!
Hi,
is "call report" a custom entity you've setup, or do you refer to entity phone call?
If it should be phone call then the relation between order and phone call could be a system relationship. For system relationships you can't configure the delete behaviour:
msdn.microsoft.com/.../bb955307.aspx
"Cascading rules can be configured for most actions. For system relationships, you can select the cascading rules for all actions except merge or delete. For custom relationships, cascading rules can be selected for all actions except merge."
If it should be a custom entity and custom relation, you should be able to edit the delete behaviour, if you change to configurable cascading. (But you mentioned that this doesn't work).
You could maybe change the criteria for your bulk delete job, to exclude orders linked to a call report.
Br Thomas
Thank you for the suggestion. You are probably right on this. I have opened the N:1 relationship between Call Reports and Orders. Below is a screenshot of how it is currently configured. I can't seem to change the Delete option, even when I change the type of behavior to Configurable Cascading. Am I missing something?
Cheers!
Hi,
could it be that the call reports that are getting randomly deleted ould have been linked to orders, that you deleted?
There coukd be releationships between the order and call report entity with delete set to cascade all.
Hth Thomas
(You can check for the relations in settings - customizations - customize the system - entity...)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156