
// 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();
}
}
Rg,
Alexander
*Due to the complex and different possibilities of deploying Dynamics 365 I highly recommend not to setup the application without some expert/partner or support. (For more information contact me under anassl@inno-solutions.info or visit www.inno-solutions.de)
*The Information comes directly from the manufacturer or provider and are validated (not guaranteed) up to date of creation of the posting.
References: