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)
this.BAccountAccessor.Cache.Update(customer);
CustomerClassDefaultInserting();
}