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.

 

  • SGbron Profile Picture
    157 on at
    RE: First Field and hover mouse methods in form

    Yes. It works for other fields.

    But for the HTML editor it doesnt work.

  • Martin Dráb Profile Picture
    231,821 Most Valuable Professional on at
    RE: First Field and hover mouse methods in form

    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
    RE: First Field and hover mouse methods in form

    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.

  • Suggested answer
    Martin Dráb Profile Picture
    231,821 Most Valuable Professional on at
    RE: First Field and hover mouse methods in form

    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();
    }

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,978 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,821 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans