Hi @development93,
You can disable the action in the RowSelected event. Below is an example,
public class APPaymentEntry_Extension : PXGraphExtension<PX.Objects.AP.APPaymentEntry>
{
#region Event Handlers
protected void APPayment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseHandler)
{
baseHandler?.Invoke(cache, e);
var row = (APPayment)e.Row;
CAReconEntry.CATranExt ReconcileCheck = PXSelect<CAReconEntry.CATranExt,
Where<CAReconEntry.CATranExt.origRefNbr, Equal<Required<APPayment.refNbr>>>>
.Select(Base, Base.Document.Current.RefNbr);
if (ReconcileCheck != null && ReconcileCheck.Reconciled == true)
{
Base.voidCheck.SetEnabled(false);
}
}
#endregion
}
The above query is to fetch CAReconEntry.CATranExt based on the Check and Payments RefNbr, you can update the query and condition below it to match your requirements.
Thanks,