Exit Navision

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



Paul Olivier
Paul Olivier

Comments

  • Dave_CoxDave_Cox Member 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
  • PauloPaulo Member Posts: 9
    This works perfect, thanks
    Paul Olivier
  • Michael_DieringerMichael_Dieringer Member Posts: 2
    Hello Paolo!

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

    EXIT(CONFIRM('close form?',TRUE));
  • Timo_LässerTimo_Lässer Member Posts: 481
    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]
  • Kevin_LionheartKevin_Lionheart Member Posts: 1
    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
  • Timo_LässerTimo_Lässer Member Posts: 481
    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]
  • DenSterDenSter Member Posts: 8,307
    Could we please keep the tips and tricks section for tips and tricks? This discussion belongs somewhere else.
  • tyrexxxtyrexxx Member 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.
      }
    }
    
  • krikikriki Member, Moderator Posts: 9,118
    [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!


  • ShenpenShenpen Member 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.
Sign In or Register to comment.