Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to stop printing sales invoice

(0) ShareShare
ReportReport
Posted on by 55

Hi, 

I need to block printing sales invoice in code. For free text invoices I can use PrintOut parameter which I'm changing in CustPostInvoiceJob.custPostInvoiceUpdate method when necesarry, but it doesn't work for invoices related to sales table. 

I need to change it in place where I will have access to CustInvoiceJour record. Blocking logic is complicated so let's say I want to block printing invoice if invoiceId ends with "2". 

Please advise how can I achieve this. 

  • Patryk Mi Profile Picture
    Patryk Mi 55 on at
    RE: How to stop printing sales invoice

    Hi Rachit,

    Printing should be stop after invoice posting. I don't want to stop printing, just avoid printing it.

    "print/show" button will be disabled too, but I want to stop automatic print after posting.

    I can't use printing checkbox on posting form, I need to overwrite it in code.

  • Suggested answer
    Rachit Profile Picture
    Rachit 4,015 User Group Leader on at
    RE: How to stop printing sales invoice

    Hi Patryk,

    Can you elaborate on when you want to block printing of sales invoice? Is it during the posting of sales invoice or printing the posted sales order invoice or somewhere else? When user manually posts a sales invoice there is an option to disable the printing of the sales invoice which users can toggle before posting. If you want to disable the print button on posted sales order invoice then you can write code on active method to disable the button based on your conditions. 

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans