Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Set focus to the short_description field when incident form loads

Servicenowr2266
Kilo Explorer

 

// Set focus to the short_description field when incident form loads
g_form.getControl('short_description').focus();....\its not working

1 REPLY 1

Ankur Bawiskar
Tera Patron

@Servicenowr2266 

g_form.getControl() should work

try to give some timeout so that form loads by that time

function onLoad() {
  setTimeout(function() {
    g_form.getControl('short_description').focus();
  }, 1000);
}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader