web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Sendkeys on NAV 2013 R2

(0) ShareShare
ReportReport
Posted on by

We are using a SendKeys for a Tree.

We are not sure about the problema we get; some keys working but we need to Expand the Tree as a default when page open.

The Page is a ListPart,  and the Tree has 3 levels.

We are using this simple code (below), but we already tried to check which is really the Expand and we cannot find a solution for this: Open the Master Page, which cal a trigger to populate the records in the ListPart as a Tree, ans we need the Expand as default, ie open all the Tree as default.

OnOpenPage()
KWGenSetup.GET;
KWGenSetup.CALCFIELDS(KWGenSetup."Enology Report Image");
KWGenSetup.CALCFIELDS(KWGenSetup."Enology Document Image");

ViewType:=TRUE;
FilterSel:=FALSE;
WhatTransferTo:=1;

GetEntriesData(FALSE,WhatTransferTo);

     // SendKeys
IF (ISCLEAR(WshShell)) THEN
  CREATE(WshShell,TRUE,TRUE);
WshShell.SendKeys('+{F2}E{ENTER}');
CLEAR(WshShell);

Tks in advance for any help from you.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at

    What do you want to send with these keys?

    WshShell.SendKeys('+{F2}E{ENTER}');

    Is it Shift+F2 and E and Enter?

  • Community Member Profile Picture
    on at

    Hi, good morning,

    Not only that. What we want to do is to have the ExpandAll for a Tree in Page.

    But we want to use this kind of code in other needs, one of them is an automatically change for Fact Box view depending of user profile.

    More critical is to have ExpandAll by default in the tree.

    We just put also '^+M' ,just like we saw somewhere in the net, but we don't see any change.

    Tks Mohana.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans