web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

A question about Print Management overrides for Customer accounts in AX

(0) ShareShare
ReportReport
Posted on by 2,007

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

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,956 Super User 2025 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?

  • Brandt Fundak Profile Picture
    2,007 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
    299,956 Super User 2025 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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
NNaumenko Profile Picture

NNaumenko 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans