Hi Everyone!

If you are ever trying to combine sites using out Professional Services Library tool “Inventory Site Combiner” and receiving the following error “You cannot combine the sites as it is the same on a transfer record in the history table.”, this article is for you!  

The issue occurs when the two sites that are being combined exist on the same transfer document in the IV history table IV30300. This is working as designed. Let me explain below an provide what you can do to get around it.

The Site Combiner tool will update the appropriate historical records and take quantities from one site to the other site.  When there has been a transfer between the two sites that are being combined, the tool cannot do it because that would cause the history record to be updated incorrectly and so you receive the error to stop it from happening. If it allowed it, the transaction would show that a transfer was done from a site to that same site which would not make sense. In instances like these, the only option would be to remove history on those types of transactions before combining sites.   This is a limitation/error of the tool. 

Use the following steps to identify the documents to remove and location of where to go to remove the data.

  1. Run the following statement to identify transfer records that could potentially cause an issue depending on what sites you are combining. This will list ALL transfers in history.

 

select * from IV30300 where DOCTYPE = 3 

 

  1. Next, narrow in on the data by restricting on the sites. For example: Say you are trying to combine quantities from site A to Site B.  Here is what the scripts would look like.

 

select * from IV30300 where DOCTYPE = 3 and TRXLOCTN = 'SITE A' and TRNSTLOC = 'SITE B'

 

Once you have your list of document numbers from Step 2, the supported method to address this would be to remove history on the documents by going to Remove Inventory Transaction History (Tools | Utilities | Inventory | Remove Transaction History).

Removing data from SQL is an option by using scripts, but to do it right you would have to write scripts to remove it from the header, lines, distributions tables etc.  Using the GP utility removes it from all tables at once so this the recommended solution.

When you test removing history, you can use the following options.           

 

  1. First enter the Document type from: Transfer to Transfer and Insert.
  2. Second use Document number to restrict it down more and Insert.
  3. If you are going to do a range of document numbers, I would mark PRINT only and uncheck the Remove and Remove Distribution options.  That way you can verify what will get removed when marking those options. If it printed the right documents that it will remove, then mark all options and Process.

 

 

  1. Run the PSTL Tool again to combine sites.   

 

Note:  If you STILL get a message after removing the documents from the 1st script above, look at the vice versa scenario to see if those are too causing the error.

 

select * from IV30300 where DOCTYPE = 3  and TRXLOCTN = 'SITE B' and TRNSTLOC = SITE A'

 

Hope this is helpful in identifying the records the need to be removed to successfully combine your Sites.

Warmest Regards,

Angela Ebensteiner | SR Technical Advisor | Microsoft Dynamics GP