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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Tools to Consolidate several Vendors (or Customers)

(0) ShareShare
ReportReport
Posted on by 14,855

Dear 

I have vendors and customers in Dynamics AX that are duplicated because of creating the same vendor with small variation in the names and they have transactions posted to them. 

Is there a tool in Dynamics AX that allows us to group several vendors or customers in one, along with their posted transactions. it would be useful if such a tool exists for Ledger accounts too.

Your feedback is appreciated

Best Regards

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at


    Hi Abdo,

    There is a method called merge on tables. You can use it to merge records and update related tables like transactions. This requires scripts to be written in x++ code. I would suggest to first do extensive testing and see if really all related tables will be merged and try to find out if it causes some other issues.

    Sample code:

    static void MergeTest(Args _args)
    {
        CustTable   cust1 = CustTable::find("2122" , true);
        CustTable   cust2 = CustTable::find("2201");
        
        ttsbegin;
        
        cust1.merge(cust2);
        
        ttscommit;
    }

    This sample will merge cust1 into cust2. So customer "2122" will be deleted and the related information should be updated to customer "2201".

    There might be problems with the table SalesJournalAutoSummary if there are already records in it for the new customer. You can then delete some records prior to the merge action.

    Again: please do extensive testing and create a backup of the production database prior to executing some script.

  • Weaveriski Profile Picture
    23,620 Moderator on at

    I would also recommend you review your customer creation process and access - you need a defined process of creation and validation to prevent duplicates. Usually this sort of creation is tightly controlled because once a customer, potentially with credit they can start accruing liability and more than one record means a potentially false credit limit defined across all of the records and a greater risk to the business.

  • DeepakKalra Profile Picture
    112 on at

    Dear André Arnaud de Calavon

    I tried to use this code for vendor merging,i replaced the code with vendtable instead custTable.

    I have posted transactions i both of vendors But i am getting below error at the execution of this job

    "A financial dimension value is based on the <dimension value> record and has been used on a transaction. You cannot delete the <dimension value> record."

    Please suggest.

  • André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at

    Hi Deepak,

    When you get this error, it means that the vendor has been used already in e.g. a journal or another posting. In that case AX 2012 did insert records in the dimension framework tables related to this vendor and prevents you from merging the vendors.  Note that the original question was related to AX2009. AX2012 has some more validations and constraints. In my book related to Merging Global Address book records, I have also described this job and the limitations in AX2012.

    (It would be possible to find out if the vendor was only entered and removed from a journal and there were no other postings involved. In that case it is possible to find the dimension value records and delete them. Note that this is NOT supported by your partner, Microsoft and also not supported by me. So this would be at your own risk and only think of it when one of the vendors don't have any posted transactions or pending journal lines.)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans