I have the following code working which prints an address label from a Customer account:
public class CustomerMaint_Extension : PXGraphExtension<CustomerMaint>
{
#region PrintAddressLabelNH
public PXAction<Customer> PrintAddressLabelNH;
[PXUIField(DisplayName = "Print address label (NH)", Visible = false)]
protected virtual void printAddressLabelNH()
{
var reportParams = new Dictionary<string, string>();
string bAccountID = Base.CurrentCustomer.Current.BAccountID.ToString();
reportParams.Add("BAccountID", bAccountID);
var printSettings = new PrintSettings
{
PrintWithDeviceHub = true,
DefinePrinterManually = true,
PrinterID = new Guid("22BD7FCA-037C-4A8E-9145-2ADCFBF71BEE"),
NumberOfCopies = 1
};
SMPrintJobMaint g = PXGraph.CreateInstance<SMPrintJobMaint>();
g.AddPrintJob("Address label (NH)", printSettings, "GAARADCU", reportParams, null);
}
#endregion
}
I have this action configured on the 'Customers' Generic Inquiry as a mass action. The idea is that this is a way for someone to mass print address labels for Customers they filter to.
Selecting one Customer and using the mass action button to 'Print address labels' works great. But selecting multiple Customers in the same way throws up errors in the DeviceHub application (read bottom to top):
I am unable to determine what the cause could be. Does anyone have any helpful direction?