Customizations - Dev Console vs. CustomSpace
I am seeking some guidance on understanding why I am having an issue and how to resolve it. I often obtain items or ideas from here, test them out in the Dev Console of the a browser (IE 11 or Chrome) and the customizations work without issue then fail to work as expected when added to CustomSpace.
I try one of two methods, adding code directly to Custom.js, or create a new file with the custom code and call/load it via Custom.js.
I have added a new field to the Change Request form that is to be hidden if the Category for the template does not equal Minor. If the Category = Minor, then I attempt to add the attribute to require the field, then change the text and coloring of the label.
This code is loaded via loadscript() in Custom.js
I then have this code added to Custom.js to handle new CR's created
The else content in both is the values that I have tried to add, with the expectation that they will require the field and change the text when the condition is met, however this is not happening.
As referenced in this thread by Tom_Hendricks https://community.cireson.com/discussion/comment/7942#Comment_7942 to hide fields. These work flawlessly when executed via the Dev Console, but not once added to CustomSpace via one of the two methods above.
For my testing I try to run in Incognito or using Ctrl + F5 to clear the cache and perform the hard reload with the expectation that the code would run successfully.
I have experienced these issues on 7.6 and 8.0, and thinking it must be something I am doing and not a bug with the portal.
Any and all help is greatly appreciated.