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