Skip to main content

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.

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.


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

 


@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.


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.


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