When user send Shift+Shift+F7

krasi_varna_77krasi_varna_77 Member Posts: 34
When I run a form triger OnFindRecord is started. when the user press keys Shift+Ctrl+F7 or button which clear a filters triger OnFindRecord strated again. how I determined when is pressed toolbar for clear filters

Comments

  • WaldoWaldo Member Posts: 3,412
    Afaik, this is not possible, I'm afraid.
    The pointer doesn't leave the record, because the record is still displayed. That's why no trigger is "fired".

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • krasi_varna_77krasi_varna_77 Member Posts: 34
    So . than give me a idea what I set a filter when I start a Customer List, and when I send Shift+Ctrl+F7 this filter clear
  • lubostlubost Member Posts: 623
    I think that FILTERGROUP command can solve your problem.
  • ara3nara3n Member Posts: 9,256
    Create another customer variable. On open form copyfilters from rec to this variable.

    add you code onaftergetrecord to compare the filters to rec and if they are different, you know that the user has changed the filters.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • krasi_varna_77krasi_varna_77 Member Posts: 34
    I use triger

    Form_OnFindRecord()
    EXIT(SetFilterPerUser);


    Form_OnAfterGetRecord
    ......

    SetFilterPerUser() : Boolean

    IF Users.GET(USERID) THEN BEGIN
    CASE Users."Job Type" OF
    Users."Job Type"::Salesperson : BEGIN
    RESET;
    SETRANGE("Salesperson Code",Users."Person Code");
    RecordFind:=FINDFIRST;
    CurrForm.EDITABLE:=TRUE;
    EXIT(RecordFind);
    END;
    Users."Job Type"::Speditor,Users."Job Type"::SeniorSpeditor : BEGIN
    RESET;
    SETRANGE("Senior Speditor",Users."Person Code");
    RecordFind:=FINDFIRST;
    CurrForm.EDITABLE:=TRUE;
    EXIT(RecordFind);
    END;
    END;
    END;

    this triger is execute one way started the form and second when user press key Shift+Ctrl+F7
  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    Hi All

    FILTERGROUP := 2;
    set filters ....
    FILTERGROUP := 0;
Sign In or Register to comment.