Good day all,
I have added a project column to the grid on the reconciliation tab of the Fixed Assets form. After that I added a project ID on the header as shown below
When I select a project ID at the top I want it to filter the data below using the project ID selected. I have extended the AssetMant graph using the code below but when I publish I get errors
namespace PX.Objects.FA
{
public class AssetMaint_Extension : PXGraphExtension<PX.Objects.FA.AssetMaint>
{
#region Event Handlers
public PXFilter<GLTranFilter> Filter;
protected virtual IEnumerable DsplAdditions()
{
if (Filter.Current != null && !string.IsNullOrEmpty(Filter.Current.UsrProjectFilter))
{
// Apply filter to the grid's data view based on UsrProjectFilter
return DsplAdditions.Select().RowCast<FAAccrualTran>().Where(record =>
record.usrPJ == Filter.Current.UsrProjectFilter);
}
else
{
// If UsrProjectFilter is not specified, return all records
return DsplAdditions.Select();
}
}
#endregion
}
}
Here is the error I am getting.
I have also attached the customization package below.
What could be the issue?