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 :
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 843
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.
I have the same question (0)
  • Hana Xue Profile Picture
    Microsoft Employee on at
    How to close form in x++ if the user is not responding longer then given time ?
    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
    8,585 on at
    How to close form in x++ if the user is not responding longer then given time ?
    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
    843 on at
    How to close form in x++ if the user is not responding longer then given time ?
    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,004

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 857 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 548 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans