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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to check if a window is in focus

(0) ShareShare
ReportReport
Posted on by 250

Hello,

I know I can use the isopen() function to check whether or not a window is open but if there is more than 1 window open how can I find out which one is in focus?

 Thank You.

*This post is locked for comments

I have the same question (0)
  • veeyeskay Profile Picture
    on at
    Re: How to check if a window is in focus

    Hi Roaa

     Unfortunately, I do not see an easy way to achieve this, even if you are planning to write some customization. If you are planning to customize (even though it might be very cumbersome), you can do this.

    1. Create a integer global field.
    2. Write a window activate trigger on the window which you need to check the focus on, and capture the resource ID of that window into the global variable.
    3. So at anypoint when u check the global variable, you know the resource ID of the window which is active (or) not.
    4. But the painful part is that this trigger needs to be written to almost all the windows the users access, so that the value for the global field sets properly.

    Let me know if you need further assistance.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans