Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Errors in dirparty after duplicating company

Posted on by Microsoft Employee

Hi

We have duplicated a company and now we have lot of problems when creating new customers. We have experienced problems like this from time to time, where old records in some DirParty tables conflict with new records.

The DirParty logic is a complete mess (at least in my head) and I would like to know if someone out there has had similar problems and perhaps created a job to identify orphan records in all the different DirParty tables. Right now I dont know what data I could delete...

This time saving a customer with an address failed in DirPartyAddressRelationShipMapping since it points to a record in DirPartyAddressRelationship that contains a partyid that does not exist in the DirPartyTable table. I think I can remove these records, but I am not sure at all.

/Jonas

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Errors in dirparty after duplicating company

    When you duplicate a company, the shared component of a company should be kept intact. This is generally true for any virtual company (shared table collection).

    When you duplicate a company, and then make sure the new company is part of the virtual company for the global address book where it came from, there should be little problem *knock on wood*. There should also be no problem if the GAB was not shared to begin with...

    If you dont do this, then indeed, shit hits the fan, big time.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Errors in dirparty after duplicating company

    Hi Jonas,

    I agree with your DirParty logic, it is a complete mess.  What type of errors are you getting when you create a new customer?  

    If you can narrow down what type of DirParty problem you have (perhaps something like multiple addresses for a customer) you can perhaps use direct SQL and query all of the orphan records.  I would left outer join the DirParty tables with all of their (messy) relations.  From there you can look at NULL values and possibly get rid of them.

    This is only a suggestion however and I only see it working if you can figure out what type of DirParty problem you have.  Use a test environment and backup your DB first!

    Kind regards.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans