Skip to main content



No record found.

Microsoft Dynamics AX forum

setFocus() method doesnt work in sysOperationFramework

Posted on by 157

Hello to everyone.

I want to use setFocus() method for a control of a sysOperationFramework form to move the cursor directly to a specific control.

I use the UIBuilder class for that and more specifically the postRun() method. 

everything I am trying to use like enable(), visible(), etc works fine. 

But setFocus() method doesn't seem to work for some reason. I also tried to do it in postBuild() but I had an error in stack trace that said that setFocus() does not exist. 

The block below describes the code I use.

public void postRun()
    FormReferenceControl plainText;


    plainText = this.bindInfo().getDialogField(contract,
        methodStr(MyContract, parmPlainText)).control();


Does anyone know what could be the reason that this method does not work?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans