Hello,
We are having some legacy codes like below (with some modifications to make it look short):
protected void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
SOLine soLine = (SOLine)e.Row;
if (soLine != null)
{
PXUIFieldAttribute.SetEnabled<SOLineExt.usrEstWgt>(cache, soLine, false);
InventoryItem item = PXSelect<InventoryItem,
Where<InventoryItem.inventoryID, Equal<Required<InventoryItem.inventoryID>>>>
.Select(Base, soLine.InventoryID);
if (item != null)
{
InventoryItemExt rowExt = PXCache<InventoryItem>.GetExtension<InventoryItemExt>(item);
SOLineExt soLineExt = PXCache<SOLine>.GetExtension<SOLineExt>(soLine);
cache.SetValue<SOLineExt.usrBrand>(soLine, rowExt.UsrBrand);
cache.SetValue<SOLineExt.usrPackSize>(soLine, rowExt.UsrPackSize);
}
}
}
It is not perfect, but can run without error.
However, recently, after upgrading to 2021R2, user are complaining the SO entry becomes slow with more than 10 lines on.
It probably Caused by the soline_rowselected event. But if I would like to rewrite. What is the best event place I move the codes to?