How do you open a form after logging in?

Cali_KoppersCali_Koppers Member Posts: 19
This is probably something that is very simple. I'm running 4.0 SP3 (5.0 SP1). I want to open a form after the user logs in. What is the best way of doing this? Please let me know. Thanks for your help.

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Add this code at the end of function LogInStart (codeunit 1):
    IF GUIALLOWED THEN
      FORM.RUN(FORM::"Customer Card");
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • ufukufuk Member Posts: 514
    Login trigger is executed for all users so you could need to filter related users to display this form. (if everyone does not have permission to access it) Otherwise system displays an error message but then skips it.
    Ufuk Asci
    Pargesoft
  • Cali_KoppersCali_Koppers Member Posts: 19
    Works like a charm. Thanks.
  • DuikmeesterDuikmeester Member Posts: 304
    A kinda 'old-style' official way it used to be done in older versions of NAV but still work.

    Create TRIGGER with ID 1 in ApplicationManagement CODEUNIT 1 and have it return Integer of FORM ID
    PROCEDURE MainMenu@1() : Integer;
    BEGIN
      EXIT(FORM::"Main Menu");
    END;
    

    HOWEVER!!!

    I noticed some dimwit@ms.com created the GetCurrency trigger with this ID in 2009SP1!!! Hope they change this in future update...
Sign In or Register to comment.