Skip to main content
Answer

Changing filter does not clear selected entries in custom Processing Form

  • February 2, 2023
  • 2 replies
  • 67 views

Forum|alt.badge.img

Hi, all. I’m currently working on custom processing form which uses a filter. However whenever I select entries and change the filter, the entries I selected remain selected. Is there an event handler needed to clear the selected fields or should it automatically clear all selected fields when the filter is updated?

 

Here are some screenshots and initialization of the view.

 

 

public SelectFrom<ARPayment>.
Where<ARPayment.docType.IsEqual<ARDocType.payment>
.And<ARPayment.status.IsEqual<ARDocStatus.balanced>.Or<ARPayment.status.IsEqual<ARDocStatus.closed>>.Or<ARPayment.status.IsEqual<ARDocStatus.open>>>
.And<ARPayment.status.IsLessEqual<GiroCheckToProcessFilter.action.FromCurrent>>
.And<ARPayment.voided.IsNotEqual<True>>
.And<ARPayment.paymentMethodID.IsEqual<PaymentMethodConstant.check>.Or<ARPayment.paymentMethodID.IsEqual<PaymentMethodConstant.giro>>>
.And<ARPayment.paymentMethodID.IsEqual<GiroCheckToProcessFilter.paymentMethod.FromCurrent>.Or<GiroCheckToProcessFilter.paymentMethod.FromCurrent.IsNull>>
.And<ARPayment.customerID.IsEqual<GiroCheckToProcessFilter.customerID.FromCurrent>.Or<GiroCheckToProcessFilter.customerID.FromCurrent.IsNull>>
.And<ARPayment.docDate.IsGreaterEqual<GiroCheckToProcessFilter.startDate.FromCurrent>.Or<GiroCheckToProcessFilter.startDate.FromCurrent.IsNull>>
.And<ARPayment.docDate.IsLessEqual<GiroCheckToProcessFilter.endDate.FromCurrent>.Or<GiroCheckToProcessFilter.endDate.FromCurrent.IsNull>>
>.
OrderBy<ARPayment.docDate.Desc,
ARPayment.refNbr.Desc>.
ProcessingView.
FilteredBy<GiroCheckToProcessFilter> GiroChecksList;

 

This is problematic because pressing process will process unwanted selected entries. So, any insight on this and suggestions will be invaluable. TIA!

Best answer by Dmitrii Naumov

If you want to reset ‘Selected’ for all records when you change the filter, you can use something like GiroChecksList.Cache.Clear(); on Filter_RowUpdated event

2 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • February 2, 2023

If you want to reset ‘Selected’ for all records when you change the filter, you can use something like GiroChecksList.Cache.Clear(); on Filter_RowUpdated event


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • February 7, 2023

Thanks, Dmitrii! Worked like a charm.