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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Print button

(0) ShareShare
ReportReport
Posted on by 186

Hello

In Navision 5 we implemented an error message in the Order Confirmation (form 42) after clicking on print --> order confirmation (menu button on the form). This error message appears only if the status is open.

Is it possible to implement the same in 2013 R2?

Code:

IF Status = Status::Open THEN
    ERROR(Text50000);

I could not find the function "OnPrint" or something similiar in the code.

Best regards

Raphael

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Raphael,

    printing is done from codeunit 229 Document-Print.

    I think you can add your code there in the PrintSalesorder function

    kr,

    Francis

  • Verified answer
    keoma Profile Picture
    32,729 on at

    hi,

    you can use the "Sales Header - OnAfterGetRecord()" Trigger in report 205 to check the Status Value.

    also possible: you can change CU 229. there change the function "PrintSalesOrder(SalesHeader : Record "Sales Header";Usage : 'Order Confirmation,Work Order,Pick Instruction')".

  • Verified answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    Two ways to do this:

    Modify the report 205 -"Order Confirmation" and on that report put your code on the OnAfterGetRecord () trigger to check the status.

    Or else you can modify the codeunit 229  - "Document-Print" which is used for document printing.

    In the code unit PrintSalesOrder() trigger write your code. This will enable you to use the default functionality. That means even if you change the report selection your validation is still valid and you do not have to modify the new report.

    But if you do the coding in the report, if you change your report selection, then you need to do the coding once again in your new report.

  • Raphi Profile Picture
    186 on at

    Thank you guys! I added it in the CU.

  • Raphi Profile Picture
    186 on at

    Now another question:

    What happend with the field "3010542 Bank Code" in the table 81 gen. journal line? I can not find it in 2013 R2!

    BR

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    hi,

    this is not a standard field. seems to come from a special (bank?) module. check the value of column description in the row of that field and the documentation trigger for further information.

    check also the value of field "version list" in the list of the tables (object designer). this gives you additional info about the vendor of that customization.

  • Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    3010542 field is a localization field or Addon field?

  • Raphi Profile Picture
    186 on at

    Thank you for your answer.

    Well in the table I can see the other fields, which are also in 2009 R2:

    3010531 ESR Information

    3010541 Reference No.

    3010543 Checksum

    3010544 DTA Coding Line

    3010545 Debit Bank

    3010546 Clearing

    It is the Swiss version of a standard 2013 R2 Database.

    Version List: NAVW17.10,NAVDACH7.10,NAVCH7.10

    without Documentation :(

    BR Raphael

  • Raphi Profile Picture
    186 on at

    How can I check this?

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    hi,

    these fields are part of the swiss localisation (DTA module).

    follow

    msdn.microsoft.com/.../dn267780(v=nav.71).aspx

    msdn.microsoft.com/.../dn283230(v=nav.71).aspx

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans