Launching Code at Double-Click

Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
edited 2011-04-11 in NAV Three Tier
Hi guys, I've one question for you.
I'm making a personalization on the Customer List Page. As you know (thanks to CardPageID property), performing double-click on a record in the repeater, the Card will be opened. My personalization consists in opening 2 different type of card according to a field in the customer table.
The code is simple and is the following:
IF "Only Distributive" THEN BEGIN
  CustomerCardDistributive.SETRECORD(Rec);
  CustomerCardDistributive.RUN;
END ELSE BEGIN
  CustomerCard.SETRECORD(Rec);
  CustomerCard.RUN;
END;
If I put it in an action it works with no problems.
Now I'm wondering if there's a possibility to launch this code when user makes a double-click on a record.
Thx in advance!
~Rik~
It works as expected... More or Less...

Answers

  • mihail_kolevmihail_kolev Member Posts: 379
    Action->Properties->ShortCutKey - Return (or Enter... I don't remember :oops: )
    -Mihail- [MCTS]
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Action->Properties->ShortCutKey - Return (or Enter... I don't remember :oops: )
    Rapid and clear. Works with "Return".
    Thx Mihail!
    ~Rik~
    It works as expected... More or Less...
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    I really like this solution cause I could set the Visible property of the action to False and code works anyway.
    \:D/
    ~Rik~
    It works as expected... More or Less...
  • bekiobekio Member Posts: 204
    Hello Troubles In Paradise,

    Can you describe this in more steps.
    Customer Card > F5 (Customer List) > THEN
    .. what are the steps, where did you put your code and the proporties of wich fields did you return.
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    bekio wrote:
    Hello Troubles In Paradise,

    Can you describe this in more steps.
    Customer Card > F5 (Customer List) > THEN
    .. what are the steps, where did you put your code and the proporties of wich fields did you return.

    Hi Bekio!
    1. the code I wrote has been placed in trigger OnAction() of an Action I created in Customer List.
    2. open properties of this Action and set:
    a. Visible -> false
    b. Shortcutkey -> Return

    now if you launch Customer List and you performe a double-click on a record or you press enter the code in the action created before will be executed.
    is it clear? :P
    ~Rik~
    It works as expected... More or Less...
  • mihail_kolevmihail_kolev Member Posts: 379
    Bekio, we are talking about PAGE. I guess you are asking about classic form. This is not applied for classic client forms.
    -Mihail- [MCTS]
  • bekiobekio Member Posts: 204
    Yeap, i thought about forms.

    But, for pages, what is an action in real(field, part..)!! :|
  • mihail_kolevmihail_kolev Member Posts: 379
    Navigate to the bottom of the page, Right click and select “Actions” (“Control Actions” for R2).
    -Mihail- [MCTS]
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Bekio, we are talking about PAGE. I guess you are asking about classic form. This is not applied for classic client forms.
    I'm sorry for the misunderstanding.
    ~Rik~
    It works as expected... More or Less...
Sign In or Register to comment.