locked
Record in CustomerAddressExtensionBase not removed after deletion RRS feed

  • Question

  • Hi,

    We are running a Microsoft Dynamics CRM 4.0 installation with Roll-up 6. When I remove an account I do see that the account including the related records receive StateCode 2, which implies marked as deleted.
    I also carefully checked the DeletionStateCode on table CustomerAddressBase, which was also set to 2.
    After the deletions are processed I notice the following:
    1) Account is removed.
    2) Related records, based on the cascading rules are also deleted.
    3) The record is also deleted in the table CustomerAddressBase.
    4) The record remains in CustomerAddressExtensionBase.

    I would expect that these record would also be removed.

    When I execute the following query I do get results which I wouldn't expect:

    select
    * from customeraddressextensionbase
    where customeraddressid not in (select customeraddressid from customeraddressbase
    )

    We are running Microsoft Dynamics CRM on a physical Windows 2003 R2 server. Also the SQL Server is a physical Windows 2003 R2 server running SQL Server 2005.

    So far as i can see this only happens for CustomerAddressExtensionBase. When I perform the following query:

    select

    * from AccountExtensionBase
    where accountid not in (select accountid from accountbase)

    ... the results are as expected: zero records.

    Is there someone who can give a reason for this behavior? The basic question is: 'Why is Microsoft Dynamics CRM removing the record from CustomerAddressBase and not the related record in CustomerAddressExtensionBase?'
    I cannot find anything about this issue on the net.
    Wednesday, October 21, 2009 8:44 AM

Answers

  • There was a known error with the deletion service where it would sometime leave the extension record orphaned.  I believe it was resolved in UR7.
    Matt, MVP - Dynamics CRM
    Wednesday, October 28, 2009 3:07 AM

All replies

  • Records in database only marked special flag when you delete record in CRM web-interface.

    The records are physically deleted from table by Async Service, which runs once a day.
    • Proposed as answer by sl_k83 Wednesday, October 21, 2009 9:37 AM
    • Unproposed as answer by Matt Parks Wednesday, October 28, 2009 3:07 AM
    Wednesday, October 21, 2009 9:37 AM
  • Yes I know, but the problem is that the records are removed from the CustomerAddressBase but not removed from the CustomerAddressExtensionbase after the Async service has deleted all flagged records.
    Wednesday, October 21, 2009 9:48 AM
  • There was a known error with the deletion service where it would sometime leave the extension record orphaned.  I believe it was resolved in UR7.
    Matt, MVP - Dynamics CRM
    Wednesday, October 28, 2009 3:07 AM
  • Hi Matt,

    You are correct. We just had a confirmation from Microsoft that this should be fixed with Roll-up 7. I also checked the release notes and it's stating the following:

    When you delete records, the ExtensionBase records for the corresponding child records are not deleted as expected.

    I haven't applied Roll-up 7 yet due to the fact that Roll-up 6 is in our Acceptance environment for final testing. But will perform the installation shortly. For me the case is closed :o)
    Wednesday, October 28, 2009 10:21 AM