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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to close form in x++ if the user is not responding longer then given time ?

(1) ShareShare
ReportReport
Posted on by 845
Hello,
 
I have the code:

formrun.init()
formrun.run()
formrun.wait()
//the next code
 
I would like to do formrun.close() after f.e. 100 seconds if the user doesn't do anything with form.
 
Thanks.
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Please check if the link is helpful. Or you can wait for support from other experts.
    axapta - Dynamics 365 Finance can't close current form x++ - Stack Overflow
    Best Regards,
    Hana
  • Suggested answer
    Deepak Agarwal Profile Picture
    9,337 Super User 2026 Season 2 on at
    This is interesting, may I know what the business case here., As D365Fo is browser-based and if a user is ideal at a certain time, the page will time out any ways. 
    Writing code to close the form may create issue if there are pending work/values on a record, it may also save a record with wrong values in case user is still want to change it. 
  • Shooowtek Profile Picture
    845 on at
    Hello Deepak Agarwal,

    The business case is as follows:

    The client has configurator module with some configuration models. While importing sales order some of the customers give attribute values and not exact configuration it. If the configuration connected with given attributes doesn't exists is has to be created during import. In the standard system the creation of new configId is done using g. PCRuntimeConfigurator (I cannot find any other way to create it except running this form). The form is populated by attributes in form of "configuration" (in xml), it somehow triggers external solver which does some product configuration logic and gives the redult as "solution" (in xml). The solver populates the solution into form in method "pcRuntimeControlStateChanged(PCRuntimeControl _runTimeControl, _state)" and I have extension to close the form when this method is triggered. But if there is any error in attributes the solver cannot find the solution and "pcRuntimeControlStateChanged" is never triggered. When You run the form from user interface is results in empty form, waiting for userr action. But the import has to be done in batch, without any user involvement.
     
    Thanks.
     
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 515 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 417 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 360

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans