Skip to main content
Question

Trouble printing\viewing report from a custom processing screen


Forum|alt.badge.img

Hello Community, 

I am at work on creating a custom processing screen that creates sales order of the transfer type. This part works correctly but after I save the transfer SO, I’d like to also print the sales order for that transfer SO. I’ve gone through a few iterations of the code, but currently trying to call “PrintSalesOrder” on my SOOrderEntry graph below. 

 order = transferEntry.Document.Insert(order);

 PXTrace.WriteInformation("2.1: Line Item Population");
 PXTrace.WriteInformation(s.InventoryID.ToString());
 PXTrace.WriteInformation(sExt.UsrSerialNbr);

 transferEntry.Transactions.Insert(line);
 transferEntry.splits.Current.LotSerialNbr = sExt.UsrSerialNbr;
 transferEntry.splits.Current.IsAllocated = true;

 PXTrace.WriteInformation("4: Saving transfer");
 transferEntry.Transactions.Cache.Update(transferEntry);

 transferEntry.Actions.PressSave();
 PXTrace.WriteInformation("4: Saving transfer: " + transferEntry.Document.Current.OrderNbr);

 PXSelectBase<SOOrder> cmdTransfer =
     new PXSelect<SOOrder,
     Where<SOOrder.orderNbr, Equal<Current<SOOrder.orderNbr>>,
     And<SOOrder.orderType, Equal<Current<SOOrder.orderType>>
     >>>(transferEntry);

 adapter = new PXAdapter(new PXView(transferEntry, false, cmdTransfer.View.BqlSelect))
 {
     MassProcess = false
 };

 transferEntry.PrintSalesOrder(adapter);

This results in the following trace:

 

Any ideas here? I’d be fine with my orders popping up in a new window to print just like when clicking the button on the sales order screen or from the Print\Email Orders processing screen.

Thanks,

Adam

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings