Reputation: 1
using System;
using System.Collections.Generic;
using PX.Data;
using System.Collections;
using PX.Objects.AR;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.GL;
using PX.Objects.IN;
using PX.Objects.CT;
using PX.Objects;
using PX.Objects.PM;
namespace PX.Objects.PM{}
public class
ProjectBalanceEntry_Extension:PXGraphExtension<ProjectBalanceEntry>{}
#region Event Handler
public PXFilter<ProjectBalanceEntry.ProjectBalanceFilter>(Filter);
[PXVirtualDAC]
ProjectBalanceEntry row = e.Row as ProjectBalanceFilter;
if (row != null)
{
Items.Cache.AllowInsert = row.ProjectID != null && row.AccountGroupID
!= null;
}
if (Filter.Current == null)
{
Items.Cache = row.ProjectID != null && row.AccountGroupID !=
null;
}
PXSelectJoin<PMProjectStatus,
InnerJoin<PMTask, On<PMTask.projectID,
Equal<PMProjectStatus.projectID>>>,
Where<PMProjectStatus.projectID,
Equal<Current<ProjectBalanceFilter.projectID>>,
And<PMProjectStatus.accountGroupID,
Equal<Current<ProjectBalanceFilter.accountGroupID>>>>,
{
if (project == null) project = Base.Project.Select();
if (project != null && row != null)
}
INItemSite itemsite = PXSelectJoin<INItemSite,
InnerJoin<Location, On<Location.cSiteID,
Equal<INItemSite.siteID>>>,
Where<INItemSite.inventoryID,
Equal<Required<INItemSite.inventoryID>>, And<Location.bAccountID,
Equal<Required<Location.bAccountID>>>>>.Select(Base, row.InventoryID,
project.CustomerID);
if (itemsite != null)
{
e.NewValue = itemsite.LastCost;
}
e.Cancel = true;
#endregion
I get the following error when validating this code:
Validating Binary Files Validating the website C:\Program Files (x86)\Acumatica ERP\Customization\AcumaticaPUPKT11Validation\AcumaticaPUPKT11Website IIS APPPOOL.NET v4.5 Building directory '\WebSiteValidationDomain\App_RuntimeCode\'. \App_RuntimeCode\ProjectBalanceEntry.cs(23): error CS1518: Expected class, delegate, enum, interface, or struct \App_RuntimeCode\ProjectBalanceEntry.cs(29): error CS1518: Expected class, delegate, enum, interface, or struct \App_RuntimeCode\ProjectBalanceEntry.cs(23): error CS1518: Expected class, delegate, enum, interface, or struct Compiler time, in seconds: 5.0554991 Validation failed.
Upvotes: 0
Views: 90
Reputation:
You have {}
in several places when I feel sure you meant {
namespace PX.Objects.PM{}
public class
ProjectBalanceEntry_Extension:PXGraphExtension<ProjectBalanceEntry>{}
Basically something very wrong has happened to your curly braces (eg. a Find/Replace mistake). You may need to revert to an earlier version of the source code.
Also the function definitions have thr wrong syntax:
public PXFilter<ProjectBalanceEntry.ProjectBalanceFilter>(Filter);
[PXVirtualDAC]
probably should be
[PXVirtualDAC]
public PXFilter<ProjectBalanceEntry.ProjectBalanceFilter>(Filter)
{
Upvotes: 1