0
votes

I have a use case where I want to block the printing of the sales invoice from the SOInvoice screen under certain conditions for the customer. I have looked everywhere and I don't see any way to disable specific items in the reports menu or to disable to whole menu (either way works for me). For Action items, I have seen SetEnabled, but that does not exist under PX.Reports.

I know that you can set the "Don't print" option for each customer, but that doesn't seem to stop someone from being able to print from the reports menu inside the SOInvoice.

1

1 Answers

0
votes

You need to access action menu (report). I believe the print action is added by automation steps so you need to reference the action with the display name (Print Invoice/Memo) to access it.

public class ARInvoiceEntry_Extension : PXGraphExtension<ARInvoiceEntry>
{
    public void ARInvoice_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
    {
        Base.report.SetEnabled("Print Invoice/Memo", false);
    }
}