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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Unable to close SysBoxForm in unit test X++

(0) ShareShare
ReportReport
Posted on by

When I close a SysQueryForm (by clicking on Ok button), a system generated dialog box appears on the form as shown below:-

pastedimage1671791075680v1.png

I am writing a unit test to close this dialogue box but when I try to close the sysbox form by using the X code below:-

using (SysBoxFormAdaptor sysBoxForm = SysBoxFormAdaptor::attach())
{
    sysBoxForm.CloseCtrl().click();
}


I am getting the following error:-

<error>Cannot access form CPool id 3: topmost form is SysBoxForm id 181<\error>

<error>There are open forms on the client: {"CPool (3)", "SysBoxForm (181)"}<\error>

To give a context, CPool is the form on which selecting a button opens a SysQueryForm and after selecting a criteria on the SysQueryForm for a particular table due to some join issue this system dialogue comes which cannot be fixed as of now. 

I have tried some other ways as well but they too end up throwing the same error.

So the issue is that SysBoxForm is not closing.

Since this is a system generated (kernel level) dialogue, does anyone know how to close it?

I have the same question (0)

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

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans