Skip to content

Latest commit

 

History

History
108 lines (82 loc) · 3.55 KB

File metadata and controls

108 lines (82 loc) · 3.55 KB

PX1111

This document describes the PX1111 diagnostic.

Summary

Code Short Description Type Code Fix
PX1111 The primary DAC of a processing view must contain the NoteID field. Error Unavailable

Diagnostic Description

In Acumatica Framework, a processing view of a graph requires their main DAC to have the NoteID field. This field is essential for the processing framework to properly track processing operations, store processing results, and manage the processing state for individual records. Without the NoteID field, the history of records processing in Acumatica Framework cannot function correctly.

The PX1111 diagnostic detects and reports processing graph views where the main DAC does not have the NoteID field.

Example of Incorrect Code

public class OrderProcessingGraph : PXGraph<OrderProcessingGraph>
{
	// Processing view with DAC that lacks NoteID field
	public PXProcessing<OrderDac> ProcessOrders = null!;

	public OrderProcessingGraph()
	{
		ProcessOrders.SetProcessDelegate(ProcessOrder);
	}

	private static void ProcessOrder(OrderProcessingGraph graph, OrderDac order)
	{
		// Processing logic here
	}
}

[PXCacheName("Order DAC")]
public class OrderDac : PXBqlTable, IBqlTable
{
	#region OrderID
	public abstract class orderID : PX.Data.BQL.BqlInt.Field<orderID> { }

	[PXDBIdentity(IsKey = true)]
	public virtual int? OrderID { get; set; }
	#endregion

	#region Description
	public abstract class description : PX.Data.BQL.BqlString.Field<description> { }

	[PXDBString(255)]
	public virtual string? Description { get; set; }
	#endregion

	// Missing NoteID field - required for processing views
}

Example of Correct Code

public class OrderProcessingGraph : PXGraph<OrderProcessingGraph>
{
	// Processing view with DAC that has required NoteID field
	public PXProcessing<OrderDac> ProcessOrders = null!;

	public OrderProcessingGraph()
	{
		ProcessOrders.SetProcessDelegate(ProcessOrder);
	}

	private static void ProcessOrder(OrderProcessingGraph graph, OrderDac order)
	{
		// Processing logic here
	}
}

[PXCacheName("Order DAC")]
public class OrderDac : IBqlTable
{
	#region OrderID
	public abstract class orderID : PX.Data.BQL.BqlInt.Field<orderID> { }

	[PXDBIdentity(IsKey = true)]
	public virtual int? OrderID { get; set; }
	#endregion

	#region Description
	public abstract class description : PX.Data.BQL.BqlString.Field<description> { }

	[PXDBString(255)]
	public virtual string? Description { get; set; }
	#endregion

	#region NoteID
	public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }

	[PXNote]
	public virtual Guid? NoteID { get; set; }
	#endregion
}

Related Articles