Curious about this design decision in CustomerMaint.cs

  • 2 September 2021
  • 0 replies

Userlevel 7
Badge +5

In CustomerMaint.cs the Customer_RowInserted method uses a boolean needUpdate to decide if the cache is going to be updated.  I’m curious to know why it doesn’t just call Update regardless.

		protected virtual void Customer_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
bool needUpdate = false;
Customer customer = (Customer)e.Row;
if (customer.DefBillAddressID == null)
customer.DefBillAddressID = customer.DefAddressID;
needUpdate = true;
if (customer.DefBillContactID == null)
customer.DefBillContactID = customer.DefContactID;
needUpdate = true;

if (needUpdate)



0 replies

Be the first to 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