Hi,
I want to create a custom layout for the RFQSend report in D365 Ops U10.
This should be a no-brainer, however I can't get it to work properly.
I followed the approach explained in this article : https://blogs.msdn.microsoft.com/dynamicsaxbi/2017/01/01/how-to-custom-designs-for-business-docs/.
But this didn't work because the there is no Print Management Settings for this particular report.
So I made following changes.
1) subscribed to the getDefaultReportFormatDelegate, but this delegate is never triggered for this report.
[SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))]public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result) { switch (_docType) { case PrintMgmtDocumentType::PurchRFQ: _result.result(ssrsReportStr(RFQSendExt, Report)); break; } }
2) made a copy of the PurchRFQSendController class in PurchRFQSendControllerExt and made a change in the main method. I also updated all references PurchRFQSendController to PurchRFQSendControllerExt within the class. I don't like this method of extending since we are only copying but you can't use COC in this scenario because U10 implies you MUST have a next command. Next idea would be to COC the TradeDocumentReportController.initArgs method (where the next command can be called), but this class method is not COC enabled. Any suggestions on this particular subject would be very welcome.
public static void main(Args _args) { SrsReportRunController formLetterController = PurchRFQSendControllerExt::construct(); PurchRFQSendControllerExt controller; controller = formLetterController; controller.initArgs(_args, ssrsReportStr(RFQSendExt, Report)); formLetterController.startOperation(); }
3) Extended the three menu items PurchRFQ,PurchRFQCopy and PurchRFQOriginal to use the PurchRFQSendControllerExt class instead of the original one.
But the original report is being shown even after all those changes. I set some breakpoints on PurchRFQSendControllerExt.main method and it being triggered. Also the correct report "RFQSendExt" is passed into the controller.
What approach should I be using when I try to extend this report?
Regards,
Sven Peeters
Any idea's why this isn't working, might this be a caching issue somewhere?