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
Create a new Business Partner and deactivate the old one.
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.
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.
Update the existing Business Partner's name
Pros: Really easy fix. Simply update the name field
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.
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.
Create a BP detail version table to hold historical BP details (like name, name2, etc...)
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.
Cons: This change does require you to make some database view and print format changes.
Details: create a BP Details record if/when your business partner changes the name
Change the system to create a copy record of addresses and customer/vendor details
Pro: makes documents insulated from future changes
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:
Create the BP detail table and column records.
Table: ChuBoe_BPartner_Historical
Columns:
Normal iD columns like AD_Client_ID, AD_Org_ID, Created, etc...
C_BPartner_ID
Name
Name2
etc...
Effective_Until_Date
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
Update the current print format views to return the results of this historical BP name function
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
Managing Document Sequence values when manually importing records
0:07:00 Discussion about the historical Business Partner name (BP name) customization