aaghaei, do you have a code example of this? In my research in the developer documentation, I’m not seeing how this is possible.
If I am understanding the question, here is one way you might go about this, assuming SOLine is the grid you are working with, InventoryID is the selector field, and you want to copy the fieldToUpdate into the CorrespondingField for the SOLine.
using PX.Data;
using PX.Objects.SO;
using PX.Objects.IN;
namespace SomeNameSpace
{
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class SOOrderEntryExt2 : PXGraphExtension<SOOrderEntry>
{
public PXSelect<SOLine> Lines;
protected void SOLine_InventoryID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e, PXFieldUpdated baseMethod)
{
baseMethod?.Invoke(sender, e);
SOLine line = (SOLine)e.Row;
if (line == null) return;
InventoryItem item = PXSelect<InventoryItem, Where<InventoryItem.inventoryID, Equal<Required<InventoryItem.inventoryID>>>>.Select(Base, line.InventoryID);
if (item != null)
{
Lines.SetValueExt<SOLine.fieldToUpdate>(line, item.CorrespondingField);
}
}
}
}