Hey all,
We've run into an issue with a Microsoft hotfix we just installed to resolve an issue having to deal with emailing invoices to customers. We tested it in a test environment and then rolled it out to production this weekend...only to find out that our tester neglected to test a scenario where we use Print Management settings in batch. As a result, when we try to batch process invoices we get an error in CIL when SysReportRunPrinter.isXpsDocumentWriter() attempts to execute and an InvalidRemoteCallException is thrown.
I am currently unable to debug this remotely, but I did notice that when I debugged the process not in batch, when I retrieved the PrintManagement settings, it gave me the defaults for the Invoice itself, not for the Customer, which should be the settings that should be retrieved. I then did a little digging and I realized that some time ago we added the CustTable and the PrintMgmtDocInstance table to a virtual company that we had created in AX. We've had issues with other AX functionality because of this change, so I am wondering if our adding one or both of these tables somehow has killed the override function for Print Management because some of the corresponding tables have a non-virtual DataAreaId value. For instance, in the FormLetterServiceController.checkClientOutputPrintManagement() method, you can find the following SELECT statement:
while select PrintJobSettings from printMgmtSettings
where
printMgmtSettings.Description == ''
join PrintType from printMgmtDocInstance
where printMgmtDocInstance.RecId == printMgmtSettings.ParentId
&& printMgmtDocInstance.ReferencedRecId == 0
&& printMgmtDocInstance.ReferencedTableId == 0
&& printMgmtDocInstance.DocumentType == this.printMgmtDocumentType()
&& printMgmtDocInstance.NodeType == this.printMgmtNodeType()
In our setup, printMgmtSettings is not in the virtual company, but printMgmtDocInstance is. I searched, but could not find any documentation that indicated if this sort of join has an implicit join on the DataAreaId. If so, the join will never match. In addition, this particular query would exclude any overridden print management settings for the customer, as the ReferencedRecId and ReferencedTableId are explicitly set to 0.
I am planning on opening a ticket with Microsoft on this, but I wanted to run it by you guys first (the last time I did the reverse the ticket was open for two months and you guys had it solved in an hour) and see if anyone could point me in the right direction.
Thanks.
Brandt
*This post is locked for comments