Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to delete a party which has Primary Address

(0) ShareShare
ReportReport
Posted on by 10

Hi,

I am using D365 FO(10.0.31)

I want to delete a party but the party has a primary address and the system does not allow me to delete.

This party does not have any associated role.

How can I delete this party?

pastedimage1675934514147v1.png

pastedimage1675934552001v2.png

pastedimage1675934598488v3.png

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: How to delete a party which has Primary Address

    Hi Vivian, I have tested deleting those records works for me. However, try other suggestions as it doesn't involve SQL scripts so even better solution. If still doesn't work then please provide more information so we can help.

  • Vivian Wei Profile Picture
    Vivian Wei 10 on at
    RE: How to delete a party which has Primary Address

    Hi Alireza,

    It worked, the party has been deleted. Many thanks!

  • Vivian Wei Profile Picture
    Vivian Wei 10 on at
    RE: How to delete a party which has Primary Address

    Hi Anitha,

    It works for me, thank you so much!

  • Vivian Wei Profile Picture
    Vivian Wei 10 on at
    RE: How to delete a party which has Primary Address

    Hi Mohit, thanks for your quick reaction.

    I deleted the realated record in both LOGISTICSPOSTALADDRESS and DIRPARTYLOCATION tables, but I still cannot delete the party. It told me "Primary address cannot be deleted" again.

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    Alireza Eshaghzadeh 13,564 Super User 2025 Season 1 on at
    RE: How to delete a party which has Primary Address

    Hi Vivan,

    You can follow following workaround that has been suggested by Andre Arnaud de Calavon 

    I have tested and it works fine. 

    community.dynamics.com/.../1314381

  • Verified answer
    AnithaEswaran Profile Picture
    AnithaEswaran 2,032 on at
    RE: How to delete a party which has Primary Address

    Hi,

    Please check if the below set up helps you.

    anithasantosh.wordpress.com/.../

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: How to delete a party which has Primary Address

    Hi Vivian, This is a standard validation which does not allow Deletion if there is related primary Address record in LOGISTICSPOSTALADDRESS and DIRPARTYLOCATION table.

    Deleting the related record in these two tables will allow to delete the Party. The relation is on Location Id which you can get by clicking on More options-->Advanced (under Address Tab in Party form).

    If this Party record is in production then even though its a simple sql script, before deleting the records, test your script first in Dev & Test environment as usual. Hope it helps.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,996 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans