When working with small amounts of data, use the AJAX Toolkit.
AJAX works best with relatively small amounts of data (up to 200 records, approximately six fields with 50 characters of data each). The larger the data set returned, the more time it will take to construct and deconstruct a SOAP message, and as the size of an individual record gets larger, the impact on performance becomes greater. Also, as more HTML nodes are created from the data, the potential for poor performance increases. Because browsers are not efficient, careful consideration needs to be given to browser memory management if you intend to display a large amount of data.
The following are examples of appropriate uses:
- Updating a single record.
- Modifying few fields of related child records.
- Perform one or more simple calculations and then update a record.
- Updating a record
Support users can assign cases (assign to queue) to themselves by clicking on "Accept" button present in Case detail page. On click on "Accept" button, system will change the case ownerid to current logged in user. Below is sample code:
- Updating child records or list of records
- Performing logic by calling apex method
- Performing synchronous and asynchronous calls.
- Query,create,edit,delete,undelete,merge and search records.
- Convert lead,send email and initiate approval process.
- Use describe to get object and fields information.
Refer below URL for more reference on AJAX toolkit: