Skip to main content
Question

Automated Warehouse Operations Engine trying to create new screen from scratch

  • February 25, 2025
  • 2 replies
  • 35 views

Forum|alt.badge.img

I am trying to create an AWOE screen from scratch and have extended the ScanHeader to include the fields I need.   

simplified I have this (I have tried WMSScanHeader, QtyScanHeader, ScanHeader also) : 

 public sealed class TestingScanHeader : PXCacheExtension<ScanHeader>
 {

#region HdrOrderType
[PXDBString(2, IsKey = true, IsFixed = true, InputMask = "")]
[PXUIField(DisplayName = "Order Type")]
[PXSelector(
    typeof(Search<AMOrderType.orderType>),
    SubstituteKey = typeof(AMOrderType.orderType),
    DescriptionField = typeof(AMOrderType.descr))]
[PXDefault("RO")]  // Set default value to "RO"
public string HdrOrderType { get; set; }
public abstract class hdrOrderType : PX.Data.BQL.BqlString.Field<hdrOrderType> { }
#endregion

#region HdrProdOrdID
[PXDBString(19, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Prod Ord ID")]
[PXSelector(
    typeof(Search<AMProdItem.prodOrdID,
           Where<AMProdItem.statusID, In3<PX.Objects.AM.Attributes.ProductionOrderStatus.inProcess, PX.Objects.AM.Attributes.ProductionOrderStatus.released>>>),
    SubstituteKey = typeof(AMProdItem.prodOrdID),
    DescriptionField = typeof(AMProdItem.descr))]
public string HdrProdOrdID { get; set; }
public abstract class hdrProdOrdID : PX.Data.BQL.BqlString.Field<hdrProdOrdID> { }
#endregion

#region HdrEmployeeID
[PXInt()]
[PXUIField(DisplayName = "Employee ID")]
[PX.Objects.AM.Attributes.ProductionEmployeeSelector]
public int? HdrEmployeeID { get; set; }
public abstract class hdrEmployeeID : PX.Data.BQL.BqlInt.Field<hdrEmployeeID> { }
#endregion

#region EmployeeAcctCD
[PXString(30)]
[PXUIField(DisplayName = "Employee AcctCD")]
public string EmployeeAcctCD { get; set; }
public abstract class employeeAcctCD : PX.Data.BQL.BqlString.Field<employeeAcctCD> { }
#endregion

#region DefaultInventoryID
[PXInt()]
[PXUIField(DisplayName = "Dflt Inventory ID")]
[PXSelector(
    typeof(Search<InventoryItem.inventoryID>),
    SubstituteKey = typeof(InventoryItem.inventoryCD),
    DescriptionField = typeof(InventoryItem.descr))]
public int? DefaultInventoryID { get; set; }
public abstract class defaultInventoryID : PX.Data.BQL.BqlInt.Field<defaultInventoryID> { }
#endregion
}

When I try to load the screen I get this: 

Line 969:				{
Line 970:					PXDataSource datasource = ((PXPage)this.Page).DefaultDataSource;
Line 971:					if (datasource != null && PX.Data.Process.PXAuditHelper.IsInfoAvailable(datasource.DataGraph, datasource.PrimaryView))
Line 972:					{
Line 973:						PXCache cache = datasource.DataGraph.Views[datasource.PrimaryView].Cache;


Source File: C:\Program Files\Acumatica ERP\EdgemateDB\Controls\PageTitle.ascx.cs    Line: 971

Stack Trace:
 

[NullReferenceException: Object reference not set to an instance of an object.]
   PX.Data.PXGraph.CreateInstance(Type graphType, String prefix) in C:\build\code_repo\NetTools\PX.Data\Graph\Graph.cs:290
   PX.Web.UI.PXBaseDataSource.CreateDataGraphAsSingleton(Type type) +530
   PX.Web.UI.PXBaseDataSource.CreateDataGraph(Type type) +153
   PX.Web.UI.PXBaseDataSource.get_DataGraph() +415
   User_PageTitle.InitAuditMenu() in C:\Program Files\Acumatica ERP\EdgemateDB\Controls\PageTitle.ascx.cs:971
   User_PageTitle.Page_InitComplete(Object sender, EventArgs e) in C:\Program Files\Acumatica ERP\EdgemateDB\Controls\PageTitle.ascx.cs:318
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnInitComplete(EventArgs e) +138
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2198

 

Basically it says that the primaryview is not initialized.  The primary veiw is the HeaderView which is 

 public PXFilter<PX.BarcodeProcessing.ScanHeader> HeaderView;

(my extension extends ScanHeader).  

If I change TestingScanHeader to a DAC that points at a table, (inherits from PXBqlTable, IBqlTable) it works and the screen loads.  But I need my HeaderView to point at an extended ScanHeader.  Any thoughts would be super thanks. 

 

 

2 replies

hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • February 26, 2025

Hello ​@edwardmcgovern53 ,

 

Here is the article below helps to create new screen for automated scanning warehouse operations.

How to customize an existing screen with the new Automated Warehouse Operations Engine in Acumatica ERP 2021 R1 and later | Community

The automated operation screen built on the barcode statemachine architecture and it is a complex structure. You may raise a development support case with Acumatica if you stuck at point.

Hope this helps!


Forum|alt.badge.img

Hey Harish, 

Thanks for the input.  Yes I found those articles.  Used it in the creation of States and Transitions and contrtolling logic.  Unfortunately not alot on the nuances on how to connect ScanHeader to datasources and initialization.   

Thanks


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings