How to direct the user to a specific section of the form?

Virendra K
Kilo Sage

Hi All,

The requirement is, If I hit the "Close" button to close the change request then it should ask for the Mandatory fields like Close Code , Close Notes which is on "Details" section of the form. 

Functionality is working as expected but if the focus/cursor is on another section then its not redirecting to (specific) "Details" section where the mandatory fields are placed.

 

How we could redirect cursor/user to specific section, "Details" ?

 

Regards,

Virendra 

1 ACCEPTED SOLUTION

@Virendra K 

OOB on incident form it works when we click Resolve button.

 

native view resolve.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

8 REPLIES 8

@Virendra K 

I think g_form.getControl('close_code').focus(); is not supported in workspace.

So you cannot achieve this requirement

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Virendra K 

Somebody tried it last year but seems it's not supported and hence didn't work

Set Focus on Mandatory Field in SOW Workspace 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Virendra K 

OOB on incident form it works when we click Resolve button.

 

native view resolve.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Virendra K 

if you are making some fields mandatory from that UI action then also it's not focusing in that section?

Ideally it should happen OOB?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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