Business Partner Name Version Customization

The purpose of this page is to help you create a solution where you can keep the same Business Partner (and all of its history) intact but still be able to produce historical documents with the correct name. Please note this is not a complete solution. It is a list of options and a recommendation for how to create a solution. If you believe this solution is something that would benefit you,  you can create it yourself, approach someone in the class to help you, ask Deepak or another developer to complete this task, or ask me.

Problem Statement

There are times when a Business Partner changes their name, and they wish you would create a future documents using that name. You have great history with this business partner, and you do not want to lose or orphan any historical data with the customer's name change.

Solution Options

  1. Create a new Business Partner and deactivate the old one.
    1. Pros: Easy fix (there is no customization need). All you need to do is recreate all the contacts and locations in the new Business Partner record. Finish processing old transactions with old BP, and start new transaction with the new BP.
    2. Cons: You orphan all activity in the old Business Partner. When you run sales/purchasing history report, you business partner will appear on multiple lines, and its totals will be spread across multiple records.
  2. Update the existing Business Partner's name
    1. Pros: Really easy fix. Simply update the name field
    2. Cons: Any time you go back and view or re-create a document, it will show the new name and not the name from the original document.
    3. Possible work around: if you turn on archiving and you printed a document, you will have a version of the document as it existed when it was printed.
  3. Create a BP detail version table to hold historical BP details (like name, name2, etc...)
    1. Pros: Easy to create the new BP Details table and add as a subtab to the Business Partner window. This change requires no change to Java code.
    2. Cons: This change does require you to make some database view and print format changes.
    3. Details: create a BP Details record if/when your business partner changes the name
  4. Change the system to create a copy record of addresses and customer/vendor details
    1. Pro: makes documents insulated from future changes
    2. Con: this is a very very big  project that touches many parts of the core code
Tangent: I have worked with systems that do both (1) copy the address and BP details to the individual transactions, and (2) reference the original record. iDempiere references the original record. Microsoft Dynamics copies the details to the documents. Both approaches have their pros and cons.

Recommended Solution

I would choose option #3 => Create a BP Version sub-tab to track historical names. Here are the steps to create this solution:
  1. Create the BP detail table and column records.
    1. Table: ChuBoe_BPartner_Historical
    2. Columns:
      1. Normal iD columns like AD_Client_ID, AD_Org_ID, Created, etc...
      2. C_BPartner_ID
      3. Name
      4. Name2
      5. etc...
      6. Effective_Until_Date
  2. Create a historical BP name function to return the BP Name based on a given date. The function would return the current name if no ChuBoe_BPartner_Historical records exist
  3. Update the current print format views to return the results of this historical BP name function
  4. Update the print formats as needed to make use of this name.
The ChuBoe_BPartner_Historical could be extended to hold more than just the historical name. The historical BP name function could be extended to return any text string based on the required field. The reason I like this solution is that it offers the most flexibility with the least amount of work.

2014-10-16 AM - Open Discussion

I hope this helps!!