As most of you are aware, you can set the focus of the form to a particular field using the SetFocus javascript command in Dynamics CRM.
I recently ran into an issue where this command wasn’t working. In my case, I was pulling Account address information onto a Quote form and setting the Address for the Quote. We had State set as a required field on the Quote form, but it was blank on the Account that was selected. Because I was attempting to set a required field with a null value, this will automatically set the focus on the required fields that are blank and it will override any SetFocus commands you call.
To avoid this, I put a check in place that checked the values in Dynamics CRM 2015. If it was null, I skipped the SetValue command for that field. After making this change, my SetFocus command began working again properly.
The post Setting Focus Issue with Dynamics CRM 2015 appeared first on Ledgeview Partners.