Hi Guys,
I am trying to change sales invoice report layout at runtime.
I do the following:
1. Create a class SalesInvoiceControllerExt which extends SalesInvoiceController class.
2. Create a main method in extension class where I instantiate SalesFormLetterControler and call parmReportName method where I put the new report (copy of the original one and modified).
class SalesInvoiceControllerExt extends SalesInvoiceController
{
public static void main(Args _args)
{
GiroPrintMgmtFormLetterController formLetterController = SalesInvoiceController::construct();
formLetterController.parmArgs(_args);
if (!CustInvoiceJourExtensionTH::canInvoiceBePrinted(_args))
{
return;
}
formLetterController.parmReportName(ssrsReportStr(SalesInvoiceNew, Report));
formLetterController.parmShowDialog(false);
formLetterController.parmDialogCaption("@SYS22766");
formLetterController.startOperation();
}
}
3. Create an extension of the SalesInvoice output menu item and change Object property to point to my new controller class SalesInvoiceControllerExt.
4. I try to print an invoice from the CustInvoiceJournal form using button "Use print management" but AX use the original layout instead the new one. I did some debugging so I am sure that the main method of my new controller class is invoked.
Any ideas...?
Regards,
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (