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?
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.
Hi Alireza,
It worked, the party has been deleted. Many thanks!
Hi Anitha,
It works for me, thank you so much!
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.
Hi Vivan,
You can follow following workaround that has been suggested by Andre Arnaud de Calavon
I have tested and it works fine.
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.
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156