Hello everyone,
In the below popup(Bank deposit->Add payment), I have added a custom button(Update).
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/82d1a208-75d7-41c9-88d1-b7297bbf83d5.png)
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.