先参照下图找到对应窗体上的控件
新建Extension class
[ExtensionOf(formStr(PurchTable))]
final class RIC_TP_PurchTableForm_Extension
{
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(PurchTable, PurchLine_ItemId), FormControlEventType::Lookup)]
public static void PurchLine_ItemId_OnLookup(FormControl sender, FormControlEventArgs e)
{
InventTable::lookupItem(sender);
FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
ce.CancelSuperCall();
}
}