Hello everyone,
In the below popup(Bank deposit->Add payment), I have added a custom button(Update).
In the button click, I will verify some conditions and I have to update the selected checkbox to true to the payments which are satisfied the conditions.
But, I’m unable to update the checkbox to true. Below is the code i have tried.
#region Event Handlers
public PXAction<PaymentInfo> ImportPayment;
PXButton()]
PXUIField(DisplayName = "Update")]
public virtual IEnumerable importPayment(PXAdapter adapter)
{
if (Base.AvailablePayments.Any())
{
foreach (PaymentInfo paymentInfo1 in Base.AvailablePayments.Select())
{
if (paymentInfo1.ExtRefNbr == "417028599")//Some conditions need to be checked to make selected checkbox true
{
paymentInfo1.Selected = true;
// Base.AvailablePayments.Cache.Update(paymentInfo1);
//Base.Cachesctypeof(PaymentInfo)].SetValueExt<PaymentInfo.selected>(paymentInfo, true);
}
}
}
return adapter.Get();
}
#endregion
How do i make few payments checkbox to be true automatically when user clicks on update button?
Can anyone suggest what is the issue here.
Attached the complete design and package here.
Thanks in advance.