Skip to main content
Question

Error action release in Generiq Inquiry Reconciliation Statements

  • September 9, 2026
  • 2 replies
  • 33 views

Forum|alt.badge.img

Hello,

I have added the Mass Action Release to the GI Reconciliation Statements, but when attempting to release, the following error occurs. 

Unable to cast object of type 'PX.Objects.CA.CARecon' to type 'PX.Data.PXResult`1[PX.Objects.CA.CARecon]'.
at PX.Data.PXFirstChanceExceptionLogger.ProfilerFirstChanceException(Object o, FirstChanceExceptionEventArgs args)
at PX.Objects.CA.CAReconEntry.release(PXAdapter adapter)
at PX.Data.PXAction`1.RunHandler(PXAdapter adapter)
at PX.Data.PXAction`1.<Press>d__39.MoveNext()
at PX.Data.PXAction`1.<Press>d__39.MoveNext()
at PX.Data.Maintenance.GI.GIFilteredProcessing.<>c__DisplayClass36_1.<PerformAction>b__2(GenericResult rec, Int32 index)
at PX.Data.Maintenance.GI.GIFilteredProcessing.<>c__DisplayClass35_0.<HandleProcessingExceptionsFor>b__0(GenericResult gr, Int32 i)
at PX.Data.Maintenance.GI.GIFilteredProcessing.HandleProcessingExceptionsFor(GenericResult item, Int32 itemIndex, Func`3 action)
at PX.Data.Maintenance.GI.GIFilteredProcessing.PerformAction(List`1 items)
at PX.Async.CancellationIgnorantExtensions.RunWithCancellationViaThreadAbort(Action method, CancellationToken cancellationToken)
at PX.Data.PXProcessingBase`1.<>c__DisplayClass90_0.<SetProcessDelegate>b__1(List`1 list, CancellationToken cancellationToken)
at PX.Data.PXProcessingBase`1.<>c__DisplayClass89_0.<SetProcessDelegateCore>g__ProcessList|0(List`1 list, PXProcessingMessagesCollection`1 perrowmessage, CancellationToken cancellationToken)
at PX.Data.PXProcessingBase`1.<>c__DisplayClass89_0.<SetProcessDelegateCore>b__1(List`1 list, CancellationToken cancellationToken)
at PX.Data.Maintenance.GI.GIFilteredProcessing.<>c__DisplayClass42_0.<Process>b__1(CancellationToken cancellationToken)
at PX.Async.Internal.PXLongOperationPars.PopAndRunDelegate(CancellationToken cancellationToken)
at PX.Async.Internal.RuntimeLongOperationManager.PerformOperation(PXLongOperationPars p)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at PX.Async.Internal.PXThreadPool.RequestItem.Run()
at PX.Async.Internal.PXThreadPool.RunItem(RequestItem item)
at PX.Async.Internal.PXThreadPool.Run()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

I have also attached the generic inquiry .xml file

2 replies

jinin
Pro I
Forum|alt.badge.img+12
  • Pro I
  • September 9, 2026

Hi ​@mujib 

The GI Mass Action fails due to a row-type mismatch. This does not appear to be a configuration issue with the GI.

The Release action on CA302000 (Reconciliation Statements) is a processing-screen action. On the native screen, records are loaded through a processing view that wraps each record as PXResult<CARecon>. However, when the same action is invoked through a GI Mass Action, the GI engine passes plain CARecon records. This results in an internal cast failure.
 

The native Release action is not designed to be invoked directly as a GI Mass Action. We recommend adding a small customization with a wrapper action on CAReconEntry. The wrapper can accept the plain CARecon records passed by the GI, load them properly through the graph, and then invoke the standard Release logic.

This approach keeps the customization small and contained, without modifying Acumatica's core logic, and follows the standard pattern for making processing actions compatible with GI Mass Actions.

 


Steve Milner
Varsity III
Forum|alt.badge.img+2
  • Varsity III
  • September 9, 2026

@mujib Jini has this right, and I'll add the specifics so you can build it in a few minutes.

The Release handler on CA302000 walks the adapter's rows as PXResult<CARecon>. On the form that's what the grid view returns. From a GI mass action the engine builds the adapter around the bare CARecon row it selected, so the cast throws. Nothing in your GI XML is wrong and no GI setting changes it. There's no native mass-release screen for reconciliation statements either, so a small wrapper is the route.

The good news is the actual release logic is a public static method, so the wrapper is tiny:

public class CAReconEntryExt : PXGraphExtension<CAReconEntry>{    public PXAction<CARecon> releaseFromInquiry;    [PXButton(CommitChanges = true)]    [PXUIField(DisplayName = "Release Selected")]    protected virtual IEnumerable ReleaseFromInquiry(PXAdapter adapter)    {        var list = adapter.Get<CARecon>().ToList();        foreach (CARecon recon in list)            CAReconEntry.ReleaseCARecon(recon);        return list;    }}

adapter.Get<CARecon>() accepts either shape, so this works from the GI and from the form. Point the mass action at Release Selected instead of Release. The GI already runs the batch as a long operation and reports each row separately, so a statement that's on hold or has unreleased items will error on its own line and the rest will go through.

Test it on a snapshot first. Release marks the statement reconciled and saves it, and I don't know a supported way to reverse that.