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 :
Microsoft Dynamics AX (Archived)

Change Focus in Form

(0) ShareShare
ReportReport
Posted on by

when i modified in field i need to add new line and set focus on the same field in the new line

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi momenmagdi!

    Try to use findRecord() method on DS and setFocus() method on control.

    formDataSource.findRecord(Mybuffer);

    controlName.setFocus();

  • Suggested answer
    Hossein.K Profile Picture
    6,648 on at

    Hi momenmagdi,

    To set the focus on specific control when form is open:

    public void firstField(int _flags=1)
    {
        ;
        super(_flags);
        desiredControlName.setFocus();
    }


    And  to set focus on a grid field:

    formdatasource.findrecord(buffer);
    
    controlname.setfocus();


  • Community Member Profile Picture
    on at

    i need to set focus on serial number in invent transfer line form

    when i add new line in this form set focus on serial number field

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    1. Set AutoDeclaration property to YES on InventDimIssue_InventSerialId or InventDimReceipt_InventSerialId field on form design.

    2. In create() method on InventJournalTrans data source table after super() write InventDimIssue_InventBatchId.setFocus() or InventDimReceipt_InventSerialId.setFocus()

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans