Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Closing Windows in Dexterity

Posted on by Microsoft Employee

Hi,

I am developing a Customization in Dexterity which consists of a functionality behaving like a wizard. I have thus created a Form having several Windows. I am trying to close and open each successive windows in the Wizard using the following code:

open window 'MySecondWindow' of form 'MainForm';

close window 'MyFisrtWindow' of form 'MainForm';

Meanwhile, when using these statements no forms are opened after executing the code.

Nevertheless, if I only include the first statement (i.e. open window 'MySecondWindow' of form 'MainForm';), the Second form does open, but the First form obviously remains opened.

I have also tried to hide the First form by using hide window 'MyFisrtWindow', but this also does not work (the window remains opened).

Thank you.

Regards,

Joseph

*This post is locked for comments

  • Suggested answer
    Steve Kubis Profile Picture
    Steve Kubis on at
    RE: Closing Windows in Dexterity

    When you close the main window of the form (the first window in the list) the form will close automatically. That's what's happening when you try to open the second window and then close the first window.

    The common solution to this problem is to create a "Dummy" window that is the first window on the form. Set it so that it is not Auto-Open. When the form opens, this window won't be displayed. You should be able to open and close the other windows in the form, but the form will remain open until you close it explicitly.

    Steve

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans