Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

A question about Print Management overrides for Customer accounts in AX

(0) ShareShare
ReportReport
Posted on by 2,005

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

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,391 Super User 2024 Season 2 on at
    RE: A question about Print Management overrides for Customer accounts in AX

    Hi Brandt,

    If you can also reproduce this error in your TEST environment now, I would suggest to contact Microsoft Support. Probably this is a regression.

  • Brandt Fundak Profile Picture
    Brandt Fundak 2,005 on at
    RE: A question about Print Management overrides for Customer accounts in AX

    Andre,

    I did a full CIL build on the test system I was working with and services started properly. I still received the error.

    Brandt

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,391 Super User 2024 Season 2 on at
    RE: A question about Print Management overrides for Customer accounts in AX

    Hi Brandt,

    As you receive an error during CIL can you first confirm if the application was compiled correctly (x++ and CIL)? Are there any errors during CIL?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans