Hello,
I have created a custom processing form, based largely on the info from T240. The Graph makes use of a` PXFilteredProcessing` data view. The grid in the view is dynamically populated based on user selection. Both the loading/filtering of records and processing of checked records seems to work as expected; however, for some reason the Processing Dialog is not showing. When I initiate processing by clicking the βCalcuateβ button (the caption I set for my βProcessβ button), I merely get the little gray loading spinner (the one that appears anytime you save records, navigate, etc. in the system) NOT the actual processing dialog.
I have compared my code against Acumaticaβs standard processing forms and see nothing that could explain this behavior. Any guidance would be appreciated.
My Graph code (some code omitted for brevity):
public class MHPRProcessBenefits : PXGraph<MHPRProcessBenefits>
{
public PXCancel<ProcessBenefitFilter> Cancel;
public PXFilter<ProcessBenefitFilter> Filter;
public PXFilteredProcessing<PREmployee, ProcessBenefitFilter> ActiveEmps;
public override bool IsDirty => false;
protected IEnumerable<PREmployee> activeEmps()
{
var filter = Filter.Current;
switch (filter?.CalcType)
{
case ACA_INIT:
return SelectFrom<PREmployee>
.Where<PREmployee.vStatus.IsEqual<VendorStatus.active>.And<PREmployeeExtension.usrInitMeasureCalcd.IsEqual<False>>>.View.Select(this).FirstTableItems;
case ACA_STANDARD:
case BENEFIT:
return SelectFrom<PREmployee>
.Where<PREmployee.vStatus.IsEqual<VendorStatus.active>>.View.Select(this).FirstTableItems;
case RETIREMENT:
return SelectFrom<PREmployee>
.Where<PREmployee.vStatus.IsEqual<VendorStatus.active>.And<BAccountRetirmentExtension.usrHoursReqMet.IsEqual<False>>>.View.Select(this).FirstTableItems;
default:
return new List<PREmployee>();
}
}
protected virtual void _(Events.RowSelected<ProcessBenefitFilter> e)
{
var row = e.Row;
if (row == null)
{
return;
}
ActiveEmps.SetProcessCaption("Calculate");
ActiveEmps.SetProcessAllCaption("Calculate All");
ActiveEmps.SetProcessDelegate<PREmployeePayrollSettingsMaint>(
delegate (PREmployeePayrollSettingsMaint graph, PREmployee emp)
{
graph.Clear();
var graphExt = graph.GetExtension<PREmployeeMaintExtension>();
try
{
switch (Filter.Current.CalcType)
{
case AppConstants.CalcOperation.ACA_INIT:
graphExt.updateInitialACA(emp, true);
break;
case AppConstants.CalcOperation.ACA_STANDARD:
graphExt.updateStandardACA(emp, true);
break;
case AppConstants.CalcOperation.BENEFIT:
graphExt.updateBenefitEligibility(emp, true);
break;
case AppConstants.CalcOperation.RETIREMENT:
graphExt.updateRetirement(emp, true);
break;
}
}
catch (Exception ex)
{
PXProcessing.SetError(ex.Message);
}
});
}
The ASPX is very simple too:
<%@ Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="MH501000.aspx.cs" Inherits="Page_MH501000" Title="Untitled Page" %>
<%@ MasterType VirtualPath="~/MasterPages/FormDetail.master" %>
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%"
TypeName="PRImport.MHPRProcessBenefits"
PrimaryView="Filter"
>
<CallbackCommands>
</CallbackCommands>
</px:PXDataSource>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phF" runat="server">
<px:PXFormView ID="form" runat="server" Style="z-index: 100" Width="100%" DataMember="Filter">
<Template>
<px:PXLayoutRule runat="server" StartRow="True" LabelsWidth="XS" ControlSize="M" />
<px:PXDropDown ID="edAction" runat="server" DataField="CalcType" CommitChanges="True" />
</Template>
</px:PXFormView>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="phG" runat="server">
<px:PXGrid ID="grid1" runat="server" Width="100%" AllowPaging="True" AdjustPageSize="Auto" SkinID="Inquire" DataSourceID="ds" ExportNotes="False" NoteIndicator="False" FilesIndicator="False">
<Levels>
<px:PXGridLevel DataMember="ActiveEmps">
<RowTemplate>
<px:PXSelector ID="edRefNbr" runat="server" DataField="RefNbr" AllowEdit="true" ></px:PXSelector>
</RowTemplate>
<Columns>
<px:PXGridColumn DataField="Selected" Width="30px" TextAlign="Center" Type="CheckBox" AllowCheckAll="True" AllowSort="False" AllowMove="False" ></px:PXGridColumn>
<px:PXGridColumn DataField="UsrInitMeasureStart" Width="90" ></px:PXGridColumn>
<px:PXGridColumn DataField="UsrInitMeasureCalcd" Width="60" ></px:PXGridColumn>
<px:PXGridColumn DataField="UsrHoursReqMet" Width="60" ></px:PXGridColumn>
<px:PXGridColumn DataField="UsrCurECPStart" Width="90" ></px:PXGridColumn>
<px:PXGridColumn DataField="AcctName" Width="220" ></px:PXGridColumn>
<px:PXGridColumn DataField="AcctCD" Width="140" ></px:PXGridColumn></Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="300" />
</px:PXGrid>
</asp:Content>
Screenshot of form in UI:
