Solved

Changing filter does not clear selected entries in custom Processing Form

  • 2 February 2023
  • 2 replies
  • 42 views

Userlevel 2
Badge

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!

icon

Best answer by Dmitrii Naumov 2 February 2023, 16:57

View original

2 replies

Userlevel 7
Badge +5

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

Userlevel 2
Badge

Thanks, Dmitrii! Worked like a charm.

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved