Hi All,
I am trying to add a custom button in the Move screen called “Print Label” in the highlighted section where on pressing it runs the report Move Serial Number Layout (MAIN6501) for the given line details generated.

I have written this action but it’s giving me errors. Basically the line details Production Number, Inventory ID and the Lot/ Serial number are the parameters required to run the report.
using PX.Data;
using PX.Objects.CS;
using PX.Objects.AM.Attributes;
using System;
using System.Collections.Generic;
using PX.Objects;
using PX.Objects.AM;
using PX.Objects.IN;
namespace PX.Objects.AM
{
public class MoveEntry_Extension : PXGraphExtension<PX.Objects.AM.MoveEntry>
{
#region Event Handlers
public PXAction<AMBatch> ReportSerialNumberLayout;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Print Label", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
protected void reportSerialNumberLayout()
{
var currentMove = Base.BatchRecords.Current;
if (currentMove != null)
{
// Open the report and pass parameters
var reportParameters = new Dictionary<string, string>
{
["ProductionNbr"] = currentMove.ProdOrdID,
["InventoryID"] = currentMove.InventoryID,
["LotSerialNbr"] = currentMove.LotSerialNbr
};
throw new PXReportRequiredException(reportParameters, "MAIN6501", "Serial Number Layout Report");
}
}
#endregion
}
}Thank you!