Skip to main content
Question

Duplicate key in PMHISTORY

  • April 27, 2025
  • 7 replies
  • 75 views

Forum|alt.badge.img+1

Hi,

Is it normal to have twice row with the same keys combination?

Do I miss something?

Thanks

 

7 replies

Forum|alt.badge.img+8
  • Captain II
  • April 28, 2025

Hi ​@raphrf 

 

This could be an issue with your joins which duplicates data.

Acumatica will not allow 2 records with the same set of keys to be saved. Neither will the database.


Forum|alt.badge.img+1
  • Author
  • Captain I
  • April 28, 2025

Hi ​@raphrf 

 

This could be an issue with your joins which duplicates data.

Acumatica will not allow 2 records with the same set of keys to be saved. Neither will the database.

I see that it should be Branch/Company key , but I cant reach them and they arent in the documentation.
 

 


Forum|alt.badge.img+8
  • Captain II
  • April 28, 2025

@raphrf 

CompanyID is exclusively in the DB, this is handled by Acumatica, I highly doubt this will be your issue.

 

What are your joins on your GI, the problem will most likely be there.


Forum|alt.badge.img+1
  • Author
  • Captain I
  • April 28, 2025

What are your joins on your GI, the problem will most likely be there.

I have only one table so no relation, this is why I don’t understand !


Forum|alt.badge.img+8
  • Captain II
  • April 28, 2025

@raphrf 

 

Very sorry! Just realised you attached an image of that too!

 

CompanyID is based on the company your user is associated with, based on the tenant you are using, I believe Acumatica’s SELECT statements behind the scenes of GI’s use CompanyID to filter by the current CompanyID.

 

You could go into the DAC Schema Browser and review the ‘Source Data’, that will give you an idea as to whether there are duplicate keys in the database.

 


Forum|alt.badge.img+1
  • Author
  • Captain I
  • April 28, 2025

Hi. I think we need the branch in the Pmhistory table since the cost and/or revenu can be done by different branches, and this is the case for us, i’m pretty sure the “duplicated” rows are for two different branch. I don’t understand, or the PMHistory is weak?


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • July 2, 2025

Hi ​@raphrf were you able to find a solution? Thank you!