web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Deleting CustomerAddress entity

(0) ShareShare
ReportReport
Posted on by 1,720

Hi

I am trying to delete a CustomerAddress entity record but it is throwing the following exception:

<ErrorCode>-2147220953</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Customer Address can not be deleted because it is associated with another object. Address Id = 2e1db3a8-6fb3-4b82-9711-08db79ccb76e, AddressNumber=1, ParentId=c3fbe602-32b5-e411-80d4-0050568bc8bf, ObjectTypeCode=2</Message>
<Timestamp>2015-08-10T01:39:09.2207267Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>

The code used to work fine before I applied CRM 2013 SP1 rollup 3. Any ideas?

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    the address is associated with a contact (objecttypecode 2)

    Maybe the cascading delete behavior of the relationship inside your CRM has been customized?

    Check the status using this tutorial:

    edwardsdna.com/.../cascadingbehavior

  • Mir Hassan Ali Profile Picture
    1,720 on at

    Thanks Guido. There is a 1:N relationship between contact and address with contact being the primary entity. Since I am deleting the child entity record (address) this should not be an issue. Attached is how the relationship is setup.

    7723.Relationship.PNG

  • Aileen Gusni Profile Picture
    44,524 on at

    Hassan,

    By default once you create a contact or account, it will create 2 records of customer address which are linked to the Address 1 and address 2 fields in the contact/Account

    So most likely you wont be able to delete the first or second customer address related to that contact, you can only be able to delete the number 3, 4, and so on.

    Are you trying to delete the address 1 or 2?

    Thanks.

  • Mir Hassan Ali Profile Picture
    1,720 on at

    Hi Aileen

    Yes I am trying to delete addresses 1 & 2 and this was working fine before I applied update rollup 3. This is still working on one of the environments that I have not updated yet.

    Actually I want to set the mailing and physical addresses as null in some cases, for example when a mail gets returned etc. Is it not possible to do this via SDK? I can update all the fields as null but the composite field does not get updated.

    Thanks

  • Community Member Profile Picture
    on at

    Were you able to resolve this issue? We used to be able to delete Address 2 before upgrading to CRM Dynamics 2015. But now I am getting the same error message mentioned above. Thanks!

  • Community Member Profile Picture
    on at

    Any resolution for this?  We are experiencing this.  We used to be able to delete records from Scribe Insight (which used a CRM Adapter).  Now, it errors out with the same error message:  Customer Address can not be deleted because it is associated with another object.

  • Community Member Profile Picture
    on at

    Has this issue been resolved for anyone?  We are experiencing it also since upgrading to CRM 2015 and then 2016 last weekend.

  • TML Profile Picture
    on at

    I see lots of complaints about this error, but no solutions?  Nobody ever figured out what is going on?

  • CRM Beginner Profile Picture
    795 on at

    Hey, has anybody figured out the solution as i am also facing the same issue that i can't delete address entity in CRM ?

  • WCL Profile Picture
    140 on at

    Looks like you are trying to delete an address linked as Address No 1 to an account/contact - make sure no contact have this address linked first (link them to another address if needed) before the delete

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans