Solved

Strange Behavior when saving customer with deletedatabaserecord=1

  • 7 December 2020
  • 5 replies
  • 258 views

Userlevel 6
Badge +5

This issue brothers me for a long time.

I have two environments. 1 for development, 1 for production. I did the same steps as below:

1, Create a new customer named "TESTID"

2, Delete the "TESTID" after creation immediately. At this time, it would be marked deleteddatabaserecord =1 in BAccount table.

Now, here comes huge different. If I recreated the "TESTID" in my development environment, the system allows and just update the deleteddatabaserecord to 0 and other fields updated according to new input. However, the production environment won't allow to created the customer "TESTID", says "Can not insert duplicated line into object "dbo.BAccount" with unique index. The duplicated key is (2,TESTID)"

This issue also happens to other entities, such as Stock Item. So is there a switch or specific setting?I would be really appreciated if somebody could give me the right direction.

icon

Best answer by Irina 9 December 2020, 14:59

View original

5 replies

Userlevel 7
Badge +17

Hi @ray20,

I have verified this in 20 R2 instance by following above-mentioned steps but I didn’t any issue. In fact its working great for me.

Userlevel 7
Badge +8

Hello, this is a known issue. For more info, refer to the 

 

Userlevel 6
Badge +5

@Irina 
Hello Irina, thank you very much for logging it as a known issue.
In fact, I was doing “work around” for a long time. I just rename the old record (which I’d like to delete/ Or someone has deleted) and create a new record with the name I want to reuse.
This is workable. 
Also this need(to recreate a deleted item) might happen only 2 or 3 times a year, so it does not matter much.

I am just curious, and you know, very much like to know the root cause, for an IT stuff. I just don’t quite understand, the exactly same Acumatica version, the exactly same .Net framework and DB version, why the system works differently?
Why in 1 environment is an “Insert” and in another it is a “Update”?
Can you kindly help me to understand the puzzle better?
Thank you.

Userlevel 7
Badge +8

It differs by the database server and by the database schema of the entity.

The root cause is that the inserting of the duplicated key is prohibited on the database level, and since we should store deleted records for a while in a database, getting rid of this issue will require a massive change in the current architecture.

Userlevel 6
Badge +5

It differs by the database server and by the database schema of the entity.

The root cause is that the inserting of the duplicated key is prohibited on the database level, and since we should store deleted records for a while in a database, getting rid of this issue will require a massive change in the current architecture.

@Irina Now, understand fully. Thank you.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved