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 :
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

  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    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.

  • Verified answer
    AnithaEswaran Profile Picture
    2,032 on at

    Hi,

    Please check if the below set up helps you.

    anithasantosh.wordpress.com/.../

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    15,288 Super User 2026 Season 2 on at

    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

  • Vivian Wei Profile Picture
    10 on at

    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.

  • Vivian Wei Profile Picture
    10 on at

    Hi Anitha,

    It works for me, thank you so much!

  • Vivian Wei Profile Picture
    10 on at

    Hi Alireza,

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

  • Mohit Rampal Profile Picture
    12,573 Moderator on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 274 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 202 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans