Ajax Tools
S-Controls
| Note: S-controls have been superseded by Visualforce pages. For more information, please visit S-Control_Deprecation |
Contents |
Overview
This package contains a collection of tools for developers working with AJAX toolkit to build s-controls. Included in the package are: A syntax-highlighting editor that can load/save s-controls/apex code directly from your account at salesforce.com; extensive code samples for the toolkit, dojo, and the UI in a handy code browser; a javascript shell with completion and input history -- very handy for trying commands against the API; and a SOQL Explorer for browsing your data schema and building SOQL queries.
How to install
Ajax Tools is listed on AppExchange as a managed package and can be installed into your org by following the steps below:
1. Click on the version of Ajax Tools you would like to install
- Ajax Tools 1.0.2 (Latest stable version)
2. Press the "Get It Now" red button
3. Select "Current Salesforce administrator" and enter your username and password and hit "Continue"
4. Follow the instructions to select the security level and install
5. Once installed, Ajax Tools will show up as an AppExchange application in the pick list at the top right section of the page. Select "Ajax Tools" from this pick list.
6. Then click on the "Ajax Tools" tab and "Start AJAX Tools" button.
7. This will open Ajax Tools in a new window.
What is new in 1.0.2
- Nineteen Apex Samples
- Document browser
- Generate sample scontrol from selected query in explorer
- Update to API version 9.0
- Update to Dojo version 0.4.1
What is new in 0.9.5
- Test page for Apex package
- Better template wizard
- Basic list view template
- Check for upgrades
- Use +/- icons instead of up/down icon in shell and explorer
- Fix IE bug: resize editor frame
- Fix IE bug: tab completion in IE
- IE bug: picklist not displayed in explorer
- Add Apex templates
- Display scrollbar for apex/scontrols list
- Tooltip for icons
Support
If you need help to install/use Ajax tools, if you found a bug or you have a suggestion, please post a message to the message boards or send us a mail. Thanks.
Keymap
| Command | Key |
| Save | Ctrl-S |
| Run | Ctrl-; |
| Shell | Ctrl-D |
| Close dialog | Esc |
| Select all | Ctrl-A |
| Copy | Ctrl-C |
| Cut | Ctrl-X |
| Past | Ctrl-V |
| Undo | Ctrl-Z |
| Find | Ctrl-F |
Working with Apex
Creating a new Apex package
To create a new Apex package click the new button in the icon bar.
This will bring up a list of templates that can be used to generate Apex package.
Select the template from the list. This will take you to the template wizard like the one shown below.
Enter the name of the apex package and click next. This will generate a simple apex package and load it in the editor.
Compiling & Saving Apex code
Click the Save button in the icon bar to compile and save Apex package. You can also press Ctrl-S in the editor to compile and save. If there is an error in the Apex code, then the code is not saved. An error message is displayed in the status bar (bottom of the page).
Testing Apex code
AJAX tools makes it really easy to test Apex code. It can generate a test page for all WebService methods in your apex package. To invoke WebService methods from test page click the Run icon in the icon bar or press Ctrl-; in the editor.
Enter the parameters for the apex method in the test page form and click invoke button to execute apex code. Result returned from the apex method is displayed at the bottom of the test page.
Working with SControls
TODO test
SOQL Explorer
todo
Debug shell
todo
Todo
- More useful templates - editview, quick search, etc
- Back up scontrols to document/ajaxtools_backup folder
- Save session state/config
- Add Apex sample
- Fix template syntax and doc how to write a new template
- Fix IE bug: tab completions in shell, options in explorer
- Provide system info page: version no, api perf, limits etc
- Make describe call in explorer async
- Make explorer editable
- Keep a list of status messages
- Show progress bar/icon
- Option to generate javascript code for the selected soql in explorer
- Format scontrol/apex code
- Option to view/copy plain text
- Display apex compile errors in-line
- Getting started guide/more docs
- Ignore case for tab completion in shell
- Display apex/scontrols as tab in the open window
- Support document editing
- Customize key mapping
- Go to line number in editor
- Support Apex trigger
- Support Merge fields in SControl
- Warn user if they close editor with unsaved changes
- Bug: editor marks page as modified when it is loaded first time
- Provide a hot key Ctrl-N to search for scontrol/apex






