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 dJustification]
ModifyFilter.Update(updateTxn);
// Acuminator disable once PX1044 ChangesInPXCacheInEventHandlers dJustification]
ModifyFilter.Cache.Update(updateTxn);
ModifyFilter.Current.TxnId = row.Trxnid;
}