How to implement opening Link form

gerbagerba Member Posts: 37
Hi all!

I have to create a button in a Form, that does the same, as the paperclip in the toolbar: Open the Links form.
I see two possibities:
a) Implement the same as the paperclip does -> question: how can I find out, what it does?
b) Using SendKey needing the WShell Object (not very good)

Questions:
1. How would you resolve that?
2. Which form is being opened, when clicking the paperclip?

Thx for any hint!

Gerald

Answers

  • DaveTDaveT Member Posts: 1,039
    Hi Gerald,

    Why not use the link as is - two clicks?
    how will you know which link file to use?

    If you need it down to one click then find the link and use the HYPERLINK command
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • garakgarak Member Posts: 3,263
    checkt Table 2000000068 "Record Link" and the Online Help for this Table.

    Regards
    Do you make it right, it works too!
  • gerbagerba Member Posts: 37
    Hi all!

    I decided to send 'Ctrl+L':
    viewtopic.php?p=136083#p136083

    Creating a new form does not work, as you'd have to filter on the field 'Record ID' in table 'Record Link' - this is not possible.

    Thanks for your help
    Gerald
  • helmhelm Member Posts: 46
    Sure it is possible to filter on the Record ID field. Just use a RecordRef and something like this:

    RecLink.SETFILTER("Record ID",FORMAT(RecRef.RECORDID));
  • gerbagerba Member Posts: 37
    @administrator:
    Please remove this post!!!


    Hi!

    My code:
    contactRecRef.OPEN(DATABASE::Contact);
    contactRecRef.SETPOSITION(STRSUBSTNO('No.=const(%1)',"No."));
    recordLink.SETFILTER("Record ID",FORMAT(contactRecRef.RECORDID));
    MESSAGE(FORMAT(recordLink.COUNT));
    
    The message shows 0, although there IS a link attached to the current contact.
    If I deactivate the third line (SETFILTER), the message shows the number of all records in the table 'Record Link'.

    What's wrong?
  • gerbagerba Member Posts: 37
    Thank you!
    That's it!

    Gerald
  • tinoruijstinoruijs Member Posts: 1,226
    gerba wrote:

    Me too. :-)
    WSHShell.SendKeys('^'+'l'); did the trick.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.