Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Print button

Posted on by 180

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

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Print button

    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

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Print button

    How can I check this?

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Print button

    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

  • Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Print button

    3010542 field is a localization field or Addon field?

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Print button

    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.

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Print button

    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

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Print button

    Thank you guys! I added it in the CU.

  • Verified answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Print button

    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.

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Print button

    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
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Print button

    Hi Raphael,

    printing is done from codeunit 229 Document-Print.

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

    kr,

    Francis

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans