Due to some D365 system behavior, I'm trying to find a way to set the cursor to the beginning of a text field on editable grid control on selection. For now, I'm seeing I'm trying to see if setFocus will do it.
I've tried a number of versions of this code but I keep getting "Cannot read properties of null" or setFocus is not a function errors.
function Grid_And_Form(executionContext) {
var formContext = executionContext.getFormContext();
var gridContext = formContext.getControl("Opportunities");
var myRows = gridContext.getGrid().getRows();
myRows.getControl("wc_nextsteps").setFocus();
}