Solved

Error: Another process has updated the 'NCRLog' record.

  • 25 April 2024
  • 2 replies
  • 58 views

Userlevel 3
Badge

Hey guys,

Hope you are all well,

 

I am working on including some of our ISO records onto Acumatica.

 

I have created a new from for Non-Conformance entries and a substitute GI for the entry screen.

However, I keep receiving the error ‘Error: Another process has updated the 'NCRLog' record. Your changes will be lost.’

 

The first save works fine, however any actions thereafter, e.g., save, delete, cancel, all give that error.

 

Has anyone encountered this before?

I have attached my code files here.

NCRLog.cs

GilcrestMaint.cs

Thanks,

Aleks 

icon

Best answer by NicholasBova52 26 April 2024, 22:25

View original

2 replies

Userlevel 2
Badge +1

Hi @aiwan! Hopefully I can provide you with some help here.

Looking at the code provided, I do have some suggestions to potentially fix this issue.

  1.  In the FieldUpdated handler for NCRLog.sOOrderNbr, try replacing the selection of the SOOrder with this:
SOOrder order = SelectFrom<SOOrder>.
Where<SOOrder.orderNbr.IsEqual<@P.AsString>>.View.Select(this, row.SOOrderNbr);

Being sure to add “using PX.Data.BQL;” to the file if it’s not already there. With the current query, the SOOrder is set to be selected from the NCRLog.sOOrderNbr field from the record set as Current in cache, but the order number from the FieldUpdated method is also being provided as a parameter, which could cause some issues.

  1. Try replacing the two “SetValue” methods in the FieldUpdated handler with “SetValueExt”. This might not be strictly necessary in this case, but should at least ensure the record is marked as Updated in the cache so it is properly persisted when the user clicks Save.

I can’t be 100% sure this will fix the issue without looking at the full customization project, but it should give you something to start looking into. Let me know if this works!

Userlevel 3
Badge

Hi @NicholasBova52, changing the event handler and the “SetValue” worked like a charm, 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