This document describes the PX1087 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1087 | This invocation of the base data view delegate can cause a StackOverflowException . |
Warning (ISV Level 1: Significant) | Unavailable |
If a data view delegate overridden in PXGraphExtension
invokes the base view delegate, you must redeclare the field member of the PXSelectBase
type or one of its successors. If this field member is not redeclared, the invocation of the base data view delegate can cause a StackOverflowException
.
To prevent the warning from occurring, you should redeclare the field member of the PXSelectBase
type or one of its successors in the graph extension.
public class AccountByPeriodEnq_Extension : PXGraphExtension<AccountByPeriodEnq>
{
protected IEnumerable glTranEnq()
{
int startRow = PXView.StartRow;
int totalRows = 0;
var result = Base.GLTranEnq.View.Select(PXView.Currents, //The PX1087 error is displayed for this line.
PXView.Parameters, PXView.Searches, PXView.SortColumns,
PXView.Descendings, PXView.Filters, ref startRow,
PXView.MaximumRows, ref totalRows);
PXView.StartRow = 0;
return result;
}
}
public class AccountByPeriodEnq_Extension : PXGraphExtension<AccountByPeriodEnq>
{
[PXFilterable]
public PXSelectOrderBy<GLTranR,
OrderBy<Asc<GLTranR.tranDate,
Asc<GLTranR.refNbr,
Asc<GLTranR.batchNbr,
Asc<GLTranR.module,
Asc<GLTranR.lineNbr>>>>>>> GLTranEnq;
protected IEnumerable glTranEnq()
{
int startRow = PXView.StartRow;
int totalRows = 0;
var result = Base.GLTranEnq.View.Select(PXView.Currents,
PXView.Parameters, PXView.Searches, PXView.SortColumns,
PXView.Descendings, PXView.Filters, ref startRow,
PXView.MaximumRows, ref totalRows);
PXView.StartRow = 0;
return result;
}
}