Announcements
No record found.
Hi all,
I have a run base batch class and i want to show static text in my dialog so that how to add?
FormStaticTextControl textcontrol = new FormStaticTextControl( ?)
Thanks
Use can use addControl() of a field group to add the control. For example:
dialogRunbase.addGroup().frameType(FormFrameType::None); FormBuildGroupControl currentGroup = dialogRunbase.form().design().control(dialogRunbase.curFormGroup().name()); FormStaticTextControl staticTextControl = currentGroup.addControl(FormControlType::StaticText, 'YourControlName');
Sorry for the late replay sir,
Thanks for your answer its awesome. But if we user FormBuildGroupControl we are receiving error.
Error ;- Cannot implicitly convert from type 'FormBuildControl' to type 'FormStaticTextControl'
After that i used FormBuildControl instated of FormBuildGroupControl.
Correct me if I'm wrong sir.
Now, dialog is not open sir.
I'm getting error :- Unable to cast object of type 'Dynamics.AX.Application.FormBuildGroupControl' to type 'Dynamics.AX.Application.FormGroupControl'.
DialogText dlgText = dialogRunbase.addText("your text");
FormStaticTextControl textcontrol = dlgText.control();
"Build" controls (such as FormBuildGroupControl) are used when you're designing the form (before running it). Non-buiild controls (such as FormGroupControl) are used when the form is actually running.
Therefore what code you should write depends on when you want to execute it.
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 658
André Arnaud de Cal... 468 Super User 2026 Season 1
Syed Haris Shah 333 Super User 2026 Season 1