Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
When to Use the AJAX Toolkit
Because information is delivered via a browser, 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:
- Display or modify a single record.
- Display two or three fields from many records.
- Perform one or more simple calculations, then update a record.
The following are examples of scenarios that require case-by-case analysis:
- Update more than 200 records.
- Update records that are unusually large. For example, what happens if the user clicks the browser stop button?
- Recalculate a complex value for more than 200 records.
An example of inappropriate usage is providing a sortable grid of many records. This would require too much processing time, and browser rendering would be too slow.