Home Analyst Portal

Customizations - Dev Console vs. CustomSpace

Brad_McKennaBrad_McKenna Customer Advanced IT Monkey ✭✭✭

Howdie All,

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.

Example1: http://blog.coretech.dk/mme/customization-tips-to-the-cireson-portal/

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.

Example 2:

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.

Best Answers

Answers

  • Brad_McKennaBrad_McKenna Customer Advanced IT Monkey ✭✭✭
    Thank you for the quick and detailed reply @Nicholas_Velich.

    I forgot all about the mutation observer and the need for its usage.  Like you stated with timeout, a bit unreliable as we experienced with a implementation of mine in attempt to hurdle templates. 
  • Nicholas_VelichNicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭
    My pleasure-- hope it helped!
Sign In or Register to comment.