To access the Console, simply navigate to the desired SBM page and then press the "F12" key. Then, select the "Console" tab and look for the > prompt:
Hold on though, because you can't just start typing commands and expecting them to work. The "secret sauce" to using this method is in selecting the correct frame from the drop-down menu in the Chrome console:
- Right-Click on an element or some white-space within the body of the SBM item that you are trying to manipulate, and select "Inspect Element"
- Scroll up through the displayed HTML, allowing the mouse to move over the sections of code as you do so. You will notice as you move upwards that larger and larger areas of the current item are highlighted automatically by Chrome.
- Continue to move up through the page until you come to the "#document" element which encompasses your entire form. You will see the parent element of this document is <frame name="something">. That Name is your frame's context!
- As a basic cheat-list, a State form is usually named "Detail" and a Transition form is usually "View". There are some exceptions however, such as when moving through the results of a listing report - enough that after doing this a few times you'll generally get pretty quick at selecting the correct frame name from memory, but will occasionally have to resort to the "trick" in the steps above to figure it out.
You can use this technique to:
- Hide/Show form elements
- Debug and test custom functions (you can redefine them on the fly)
- Trigger change events
- Make AJAX calls
- Track down those hard-to-reproduce errors
...And anything else you can imagine!