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 F5 using Automation vs Dotnet

(0) ShareShare
ReportReport
Posted on by 5,136

Hello Experts,

I am trying to use the Sendkeys F5 methodology when updating a calculated field in the Parent Page when a line from Child List Part is updated.  I am hoping to use the dotnet (systemwidnwosformssendkeys dotnet system.windows.forms) as it doesn't seem to pop up the automation dialog.  See below:

SystemWindowsFormsSendKeys DotNet 'System.Windows.Forms, Version=2.0.0.0,  Culture=neutral,PublicKeyToken=b77a5c561934e089'.System.Windows.Forms.SendKeys

//Update a page

SystemWindowsFormsSendKeys.SendWait('{F5}');

SystemWindowsFormsSendKeys.SendWait('{F5}');

But this doesn't seem to work.  I don't see the calc fields from Parent page updating.

However, if I use automation (see below), it works.  But I hate that the automation dialog always pops up even though only initially.


IF ISCLEAR(wshShell) THEN
  CREATE(wshShell,FALSE,TRUE);

wshShell.SendKeys('{F5}');
wshShell.SendKeys('{F5}');

Can you advise why the dotnet technique doesn't seem to work?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    Have you set the "RunonClient" Property of the Dotnet Variable to YES?

  • Verified answer
    keoma Profile Picture
    32,729 on at

    set dotnet variable's property runonclient to true.

    use Send instead of SendWait.

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    Hey,

    I believe and as other members said Enabling Run on Client Property will solve your case. 

  • mbr Profile Picture
    5,136 on at

    I have set the runonclient to true.  But I will try the Send.  That must be it! Thank you Jonathan.

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