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)

Modify Sales Order Print Management Transaction Settings with X++

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to modify the print Management Settings Transaction document for a sales order in order to specify that this specific sales order does not need to print an invoice by default when printing.

2016_2D00_05_2D00_04_5F00_1640.png

Does anyone knows how I can easily get to this document with X++ and how to overwrite it with new values?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Modify Sales Order Print Management Transaction Settings with X++

    I just found how:

    PrintMgmtDocInstance = PrintMgmtDocInstance::find( salesTable.RecId, salesTable.TableId, PrintMgmtNodeType::SalesTable, PrintMgmtDocumentType::SalesOrderInvoice, 1, true);

    if (!printMgmtDocInstance)

    {

    PrintMgmtDocInstance::createPrintMgmtDocSettings( salesTable.RecId, salesTable.TableId, PrintMgmtNodeType::SalesTable, PrintMgmtDocumentType::SalesOrderInvoice, PrintMgmtDocInstanceType::Original, 0);

    printMgmtDocInstance = PrintMgmtDocInstance::find( salesTable.RecId, salesTable.TableId, PrintMgmtNodeType::SalesTable, PrintMgmtDocumentType::SalesOrderInvoice, 1, true);

    printMgmtDocInstance.Suppress = NoYes::Yes;printMgmtDocInstance.update();

    }

    else

    {

    printMgmtDocInstance.Suppress = NoYes::Yes;

    printMgmtDocInstance.update();

    }

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans