Exit Navision

Paulo
Paulo Posts: 9
Is it possible to have NF ask you if you really want to exit?



Paul Olivier
Paul Olivier

Comments

  • Dave_Cox
    Dave_Cox Posts: 83
    On the main menu form 330 Add This Trigger Code

    OnQueryCloseForm() : Boolean
    IF NOT CONFIRM('are you sure you want to close Navision',FALSE)THEN
    ERROR('');

    MindSource (UK) Limited
    Navision Service Partner

    david@mindsource.co.uk
    info@mindsource.co.uk
    MindSource (UK) Limited
    Navision Service Partner

    david@mindsource.co.uk
    info@mindsource.co.uk
  • Paulo
    Paulo Posts: 9
    This works perfect, thanks
    Paul Olivier
  • Hello Paolo!

    This should work too, and you won't get an error!

    EXIT(CONFIRM('close form?',TRUE));
  • An empty error message shows no dialog.

    If you type
    ERROR('Aborted');
    
    or
    ERROR(' ');
    
    you will get an error message.

    If you type
    ERROR('');
    
    then you'll get no message.
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • Hello i'm and a navision beginner,

    in the object designer (Navision 4.0) can't find the form 330.
    I need really help :-(

    Greetings Kevin
  • In Navision 4.00 all Main Menu forms (330, 331, 332, ...) are replaced by the Navigation Pane (Object Type is "MenuSuite").
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • DenSter
    DenSter Posts: 8,307
    Could we please keep the tips and tricks section for tips and tricks? This discussion belongs somewhere else.
  • tyrexxx
    tyrexxx Posts: 13
    OBJECT Codeunit 80000 Closing Navision
    {
      OBJECT-PROPERTIES
      {
        Date=23.12.05;
        Time=17:42:34;
        Modified=Yes;
        Version List=LORD;
      }
      PROPERTIES
      {
        SingleInstance=No;
        OnRun=VAR
              BEGIN
                Window.OPEN('#1#########################');
                MyFunc(1);
                Window.CLOSE;
              END;
    
      }
      CODE
      {
        VAR
          Window@1000000002 : Dialog;
    
        PROCEDURE MyFunc@1000000000(Par@1000000001 : Integer);
        BEGIN
          Par+=1;
          Window.UPDATE(1,'Closing Navision');
          IF Par=1000 THEN EXIT;
          MyFunc(Par);
        END;
    
        BEGIN
           // Created by Tyrex
        END.
      }
    }
    
  • kriki
    kriki Posts: 9,135
    [Topic moved from Navision Tips & Tricks forum to Navision forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Shenpen
    Shenpen Posts: 386
    What dodes this CU do? Recursively call itself until Navision crashes or what? :)

    Do It Yourself is they key. Standard code might work - your code surely works.