Create a Syntax Editor Macro

  1. Navigate to System Definition > Syntax Editor Macros.
  2. Create a new macro:
  3. Name: try
    Comment: Client-side try/catch
    Text:
    
    try{
    
    }
    catch(err){
        g_form.addErrorMessage("A runtime error occured: " + err);
    }
    
  4. Select Submit
  5. Open the Lab 1.1 Using the Syntax Editor Client Script. Place the cursor on a new line below the existing script
  6. Test the try / catch macro by typing try and pressing the <tab> key.
  7. Place the cursor on a new line below existing script, type help and press the <tab> key
  8. Syntax errors will prevent a save at this time, comment out or delete the help macro text
  9. Select Update to save the changes and close the record

results matching ""

    No results matching ""