From 6ce2da06ec9520f184acf722d59b6271723f9489 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 17:04:55 +0000 Subject: [PATCH 1/3] Initial plan From c4d467b39189bef2199c79bb5947a7c08dd1a33e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 17:08:43 +0000 Subject: [PATCH 2/3] Add Release Deposits action to processing screen Agent-Logs-Url: https://github.com/dnaumov/AcumaticaSendAndPrintExample/sessions/4431aa8e-235e-4894-8918-bb19141836e3 Co-authored-by: dnaumov <150417680+dnaumov@users.noreply.github.com> --- PrintSendProcess.cs | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/PrintSendProcess.cs b/PrintSendProcess.cs index 5b3dc47..4aace35 100644 --- a/PrintSendProcess.cs +++ b/PrintSendProcess.cs @@ -2,6 +2,7 @@ using PX.Data.BQL.Fluent; using PX.Objects.CA; +using System; using System.Collections.Generic; namespace SendEmailPrintReport @@ -21,7 +22,7 @@ public class PrintSendProcessFilter : PXBqlTable, IBqlTable #region ProcessingAction [PXString] [PXDefault("P")] - [PXStringList(new string[] { "P", "E" }, new string[] { "Print", "Email" })] + [PXStringList(new string[] { "P", "E", "R" }, new string[] { "Print", "Email", "Release" })] [PXUIField(DisplayName = "Action")] public virtual string ProcessingAction { get; set; } public abstract class processingAction : PX.Data.BQL.BqlString.Field { } @@ -56,6 +57,10 @@ protected virtual void _(Events.RowSelected e) { RecordsView.SetProcessDelegate(EmailRecords); } + else if (e.Row.ProcessingAction == "R") + { + RecordsView.SetProcessDelegate(ReleaseRecords); + } } } @@ -97,5 +102,28 @@ public static void EmailRecords(List list) PXProcessing.SetProcessed(); } } + public static void ReleaseRecords(List list) + { + var graph = PXGraph.CreateInstance(); + foreach (var recordToRelease in list) + { + PXProcessing.SetCurrentItem(recordToRelease); + try + { + graph.Clear(); + graph.Document.Current = graph.Document.Search(recordToRelease.RefNbr, recordToRelease.DocType); + if (graph.Document.Current == null) + { + throw new PXException("Deposit {0} {1} was not found.", recordToRelease.DocType, recordToRelease.RefNbr); + } + graph.release.Press(); + PXProcessing.SetProcessed(); + } + catch (Exception e) + { + PXProcessing.SetError(e); + } + } + } } } \ No newline at end of file From 520d18ec9ec73334c185bca3fe04b549bace12da Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 17:18:59 +0000 Subject: [PATCH 3/3] Filter out already-released deposits when Release action is selected Agent-Logs-Url: https://github.com/dnaumov/AcumaticaSendAndPrintExample/sessions/f75b3ed5-8737-4581-b4cf-5785413758b1 Co-authored-by: dnaumov <150417680+dnaumov@users.noreply.github.com> --- PrintSendProcess.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PrintSendProcess.cs b/PrintSendProcess.cs index 4aace35..8357eb1 100644 --- a/PrintSendProcess.cs +++ b/PrintSendProcess.cs @@ -45,6 +45,14 @@ public PrintSendProcess() RecordsView.Cache.AllowDelete = false; } + protected virtual void _(Events.RowSelecting e) + { + if (e.Row != null && FilterView.Current?.ProcessingAction == "R" + && e.Row.Status == CADocStatus.Released) + { + e.Cancel = true; + } + } protected virtual void _(Events.RowSelected e) { if (e.Row != null) @@ -114,7 +122,7 @@ public static void ReleaseRecords(List list) graph.Document.Current = graph.Document.Search(recordToRelease.RefNbr, recordToRelease.DocType); if (graph.Document.Current == null) { - throw new PXException("Deposit {0} {1} was not found.", recordToRelease.DocType, recordToRelease.RefNbr); + throw new PXException("Deposit {0} of type {1} was not found.", recordToRelease.RefNbr, recordToRelease.DocType); } graph.release.Press(); PXProcessing.SetProcessed();