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, ...
Suggested Answer

First Field and hover mouse methods in form

(0) ShareShare
ReportReport
Posted on by 157

Hello to everyone

I have some issues with form and form control methods in Finance and Operations (Dynamics 365).

The first one is that when I open the form(DocuView is the form with the attachments) the customer asked to automatically create a new record and the cursor to go directly to Notes field to write without pressing any clicks or buttons. 

So I created an extension, I create the record, the record also is on edit mode but the cursor doen't move from the fisrt (DocuRef_Name) field.

I tried many things like:

in init method after next call: 

1)  myField.setFocus();
2)  this.design().controlname(formControlStr(DocuView, MyField)).setFocus();
 
3) DocuRef_Name.skip();  (just to skip the field) It woks but the cursor doesnt move to the field that I want. It just dissapear (like pressing tab key)

in firstFIeld method also I tried :

1)  myField.setFocus();
2)  element.design().controlname(formControlStr(DocuView, MyField)).setFocus();
 

in OnActivated event handler also the same 
in Active method of the Datasource also.

NOTHING IS HAPPENING !! 



The second issue is the toolTip and mouseEnter methods in a control

I am trying, when you hover your mouse over a form contol which is a checkbox display method 
to have a text as the customer asked. 

both of them(toolTip and mouseEnter) never start(I tried on the debuger)

If you know anything for each of these issues I will appriciate them a lot. 

Thank you an dbest regards.

 

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Let's focus on the first question for now. (I would be better if you have a separate thread for each question.)

    Initialization is too early - do it in run() after next.

    I tested with this code:

    public void run()
    {
        next run();
    
        IsValueAttached.setFocus();
    }

  • SGbron Profile Picture
    157 on at

    Martin thank you for your response.

    I had tried in the init and the active of the datasource for that reason (becasue you said that is too early)

    Now I tried exactly what you mentioned, but for my field. (html editor field)

    The behavior is the same as I mentioned in the post. It is just get the cursor from the _name field and it is not blinking in the html editor(Its is dissapearing. Like tab key ).

    So you cannot write directly when the form opens.

    You have to click on the field first.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Are you saying that it works for you for other fields (therefore it's now clear where to do it) and your problem is specific to the HTML editor control?

  • SGbron Profile Picture
    157 on at

    Yes. It works for other fields.

    But for the HTML editor it doesnt work.

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 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans