Question

Ability to Update Filter based on Row Selected

  • 8 December 2022
  • 0 replies
  • 50 views

Userlevel 4
Badge +1

Hello,

I have the need to formulaically assign a filter value based on the row that I’m selecting. I have tried PXDefault, PXFormula combinations but they don’t work because they require something from the dac to be able to execute and since the rowselected is a runtime attribute, I don’t know how to convey that to the native field definitions.

I have also tried using _RowSelected event handler to update the cache (I know, forbidden) but that is yielding no results either. Code for this below, note that I am trying three different ways to update the field value in the effort to see if any will work, my final code would only use one.

        protected void TimeclockTrxns_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
var row = (TimeclockTrxns)e.Row;
if (row is null) return;

blyModify updateTxn = new blyModify();
updateTxn.TxnId = row.Trxnid;
// Acuminator disable once PX1044 ChangesInPXCacheInEventHandlers [Justification]
ModifyFilter.Update(updateTxn);
// Acuminator disable once PX1044 ChangesInPXCacheInEventHandlers [Justification]
ModifyFilter.Cache.Update(updateTxn);
ModifyFilter.Current.TxnId = row.Trxnid;
}

 


0 replies

Be the first to reply!

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