I have an html template included in a form on Dynamics 365. My JS code has a condition that prevents the form from saving depending on the status of the template.
While the onsave function is executing, I am unable to access any elements in the template. Elements are not being recognized by functions such as document.getElementsByClassname and document.getElementById, or via JQuery selector.