How to place a curser on the required fields when the new form loads

subbarayudu
Tera Contributor

I have a field called "type" on engagement form.

When we try to create a new engagement using new button , when the new form opens my curser need to be on the type field.

 

3 REPLIES 3

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Please check the below article for the same:-

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694100

 

Please mark my answer as correct based on Impact.

Hi Saurav,

I tried with the two solutions . But the curser is not going to the type field and it is going to place in the Name field only.

 

function onLoad() {
g_form.getControl('type').focus();
// g_form.getControl('type').scrollIntoView();
}

subbarayudu_0-1667365907303.png

 

today, when we use the New button to build a new engagement, the Vendor Engagement – New Record form goes to the Name field first. We would like the cursor to be in the Type field first. There is an existing business rule which populates the Name field after we have selected the Type field. Keep Type as the 3rd field from the top, in it’s current position.