Options

Execute action on doubleclick in list

deV.chdeV.ch Member Posts: 543
edited 2012-02-06 in NAV Three Tier
In the Service Dispatch Board, i'd like the Show Documents action bo be executed on doubleclicking a record. Since there is code to do this i can't use CardPageID.
So there is an example of doing this in My Customers List Part for Role Centers using "Return" as a shortcutkey. But that seems to only work in Role Centers.
Does anybody have another solution of doing this or is this another limitation?

Comments

  • Options
    Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Are you saying shortcutkey "Return" doesn't work in lists for you?
    It's strange...
    viewtopic.php?f=32&t=46935
    as you can see from this post I asked the same thingh and worked for me...
    May I don't get something?
    ~Rik~
    It works as expected... More or Less...
  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    you probably are trying to apply this on editable list part. Yes, this is limitation, if the list is editable, then the code is not executed, the Enter key just move to the next cell, but if you rightclick on the record you will notice that the action is bolded. This is standard behaviour for list and listpart pages. In editable mode Enter move to the next cell, in non-editable mode it opens the card (or execute the function with shortcutkey Return).
    -Mihail- [MCTS]
  • Options
    deV.chdeV.ch Member Posts: 543
    Yes i've done that too once. But can't remember where, but i tested and found out that only if i'am using a role center this trick is working for me..

    To test it i created this simple list:
    OBJECT Page 50999 Test Return Shortcut
    {
      OBJECT-PROPERTIES
      {
        Date=01.02.12;
        Time=10:03:48;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
        SourceTable=Table18;
        PageType=List;
        ActionList=ACTIONS
        {
          { 1100135005;  ;ActionContainer;
                          ActionContainerType=ActionItems }
          { 1100135006;1 ;Action    ;
                          ShortCutKey=Return;
                          Visible=false;
                          OnAction=BEGIN
                                     MESSAGE('test');
                                   END;
                                    }
        }
      }
      CONTROLS
      {
        { 1100135000;;Container;
                    ContainerType=ContentArea }
    
        { 1100135001;1;Group  ;
                    GroupType=Repeater }
    
        { 1100135002;2;Field  ;
                    SourceExpr="No." }
    
        { 1100135003;2;Field  ;
                    SourceExpr=Name }
    
        { 1100135004;2;Field  ;
                    SourceExpr="Name 2" }
    
      }
      CODE
      {
    
        BEGIN
        END.
      }
    }
    
    
    Thsi should show a message with 'test' when double clicking. But it doesn't ...
    Is this working in your version/build?


    Maybe its a version/build issue... :thumbsdown:
    I'am using 2009 R2 (Build:32900)

    @ mihail_kolev
    Yeah if i set editable to false on that test list it works,
    BUT: Why is it not working when i'am in view mode of an editable list?

    edit:
    I guess i would need to split the Service Dispatch Board in order to have a ListPart which is not editable with an action that uses return as shortcutkey... But thats kind of an overkill for just beeing able to doubleclick instead of clicking "Show Documents"...
  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    well, I think this is global limitation, because all standard lists (Customer, Vendor, Item etc...) has their Editable properties set to "No". Maybe we can ask Microsoft for DoubleClick shortcut in NAV7
    -Mihail- [MCTS]
  • Options
    TroelshTroelsh Member, Microsoft Employee Posts: 79
    You are right - it's a limitation. We use return key to tab between fields and columns. Please use another key combination that makes sense. Doubleclick isn't helpful for keyboard only users.

    Troels Bent Hansen
    Senior Program Manager
    Microsoft Dynamics NAV


    ****** This posting is provided "AS IS" with no warranties, and confers no rights ******
  • Options
    deV.chdeV.ch Member Posts: 543
    In my scenario the focus lies on a repeater that is not editable, so therefore it would make sense even for a keyboard user!

    For a user there is no difference between a not editable repeater (but page is editable since you have to enter filters to get the records you ened), and a not editable list page. The problem is that he expects to be able to hit enter or doubleclick in the Dispatch Board and the filtered record will be opend in the card page.

    I understand that it is a limitation but i would expect the same beahvoiur from a not editable repeater as from the whole page being not editable.

    But anyway thanks for clarification. :thumbsup:
  • Options
    SRishiSRishi Member Posts: 26
    @ deV.ch thank you your solution help a lot.
Sign In or Register to comment.