// Set focus to the "To" field for new/draft emails so the focus order
// follows the logical visual layout (To -> Cc -> Subject -> Body).
var formType = formContext.ui.getFormType();
var statusCodeAttr = formContext.getAttribute("statuscode");
if (formType === 1
|| (formType === 2 && statusCodeAttr && statusCodeAttr.getValue() === 1)) {
var toControl = formContext.getControl("to");
if (toControl) {
toControl.setFocus();
}
}

Report
All responses (
Answers (