Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 947 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 947 Bytes

Trineo Apex Utils

A collection of useful Apex utility classes for the Force.com platform. Written by the dev team at Trineo Ltd for the Force.com developer community.

QueryUtil

Extends the capability of standard SOQL queries in Salesforce. Accepts query strings in format "Select * From ..." and dynamically replaces "*" with all fields for the sObject table being queried. Custom objects are also supported.

MergeUtil

Merge one or more sObject records with a string that contains merge fields in format {!SOBJECT_NAME.FIELD_NAME} Note: Requires the QueryUtil class.

RandomUtil

Provides utility methods associated with randomising. At present, includes:

- getRandomInteger(Integer lower, Integer upper): get an integer n where lower <= n < upper
- shuffle(List<Object>): randomise the order of the provided list in-place (mutating the original list)