Just want to make sure I’m not missing something here. I want a script to run on a record in both View and Edit modes. It must be a client script (does stuff with DOM after page loads). It needs to run automatically (not triggered by a button).
I feel like I need THREE scripts to achieve this
1) Custom Form Client Script (does the “stuff” via PageInit in Edit mode)
2) Client Script (does the “stuff” whenever it is loaded
3) User Event Script (checks if we are in View mode, and if so, loads #2 above)
Is this correct? it seems unnecessarily cumbersome. Is there a way for a standalone Client Script to know if it is in View or Edit mode? It won’t be getting passed a “context” object.