I have a processing screen to get data from an Acumatica table and do gyrations and put data into a custom table. I don’t need to select any records from a filter results. I just want to use the filters on the screen to “do the work” on all records returned by the filter.
I originally had a button under the End Date that would fire a custom action. In order to make this a schedulable process, I THINK I needed to do it as a processing screen.
So...I tried to re-do the screen.
Since I am pulling data from the AuditHistory table, there is no “Select checkbox” to select on the processing screen.
Is my delegate not firing because there is no Select checkbox available in the filter results?
Is there a way to use a PXFilterProcessing without a list of records with a Select checkbox?
This is what my screen looks like after removing the Get Report Data button and making it a processall button on the top of the screen.
This is the constructor that sets up the processing button.
_currentUser = CommonServiceLocator.ServiceLocator.Current.GetInstance<ICurrentUserInformationProvider>().GetUserId();
RecordsToProcess.SetProcessAllCaption("Get Report Data");
This is my filter selector.
public PXFilteredProcessing<AuditHistory, QTCAuditHistoryReportFilter,
And<AuditHistory.changeDate.IsBetween<QTCAuditHistoryReportFilter.startDate.FromCurrent, QTCAuditHistoryReportFilter.endDate.FromCurrent>>>> RecordsToProcess;
When I fill in the filter fields, I do get data from the AuditHistory table. Strangely, it only shows 1 column.
Since I really don’t care what is being displayed, I don’t think this matters for me.
This is the delegate that should be fired when you click the process button
private void GetNewDataset(List<AuditHistory> entriesToProcess)
PXLongOperation.StartOperation(this, delegate ()
IsProcessing = true;
I am aware that the delegate SHOULD be private static void in order for this to run asynchronously. Since this will be a scheduled operation running behind the scenes, I don’t care of it runs synchronously. My delegate needs to be aware of the filter values on the graph because it does special stuff depending on the values. I delete existing data from my custom table based on the date range and table name so I don’t add duplicate records.
Is there some “hack” that I can do to simply fire a method without having to have a Select checkbox in a grid? I don’t even need to see the data returned by the filter.
Best answer by Naveen BogaView original