Skip to main content
These are the smaller shared utilities the Platform package (FCORE_BASE) exposes to subscriber and other-package code under the FCORE_BASE namespace — the collection, validation, describe, and LWC helpers you reach for constantly in trigger and service code. Reference them with their namespaced names (for example FCORE_BASE.ObjectUtils). The bigger pieces have their own pages: Logging, Caching, and DB Classes. For the surrounding frameworks, see the Trigger Framework, the Event Framework, and Services.

List and Set Manipulation

FCORE_BASE.ObjectUtils and FCORE_BASE.StringUtils collect the collection helpers you reach for constantly in trigger and service code. All methods listed are global static.

Other Notable Utilities

Validation — FCORE_BASE.ValidationUtils

Guard required inputs and surface consistent messages.
  • validateIsNotNull(Object value, String name) — throws if value is null, naming the offending argument.
  • validateFieldIsNotNull(SObject record, SObjectField field) — throws if the field is null on the record.
  • buildRequiredFieldIsMissingMessage(SObjectField field) — builds the standard “required field is missing” message.

Describe Lookups — FCORE_BASE.FieldDescribe

Cached field-describe access so you do not repeat describe calls.
  • getFieldDescribe(String objectName, String fieldName)
  • isAllowedPicklistValue(Schema.SObjectField field, String value)
  • trimFieldValue(Schema.SObjectField field, String value)

Org-Timezone Datetimes — FCORE_BASE.DateUtils

Use FCORE_BASE.DateUtils.getInstance().getOrganizationDatetime() when you need a datetime in the org’s timezone rather than GMT.

Aura/LWC Error Surfacing — FCORE_BASE.AuraUtils and FCORE_BASE.LabelUtils

For consistent error handling out of @AuraEnabled controllers:
  • FCORE_BASE.AuraUtils.throwAuraHandledException(String message) — throws an AuraHandledException the client can read.
  • FCORE_BASE.LabelUtils.buildGenericErrorMessageForContext(String context) — a generic, context-tagged error message.
  • FCORE_BASE.LabelUtils.buildErrorMessageForContext(String context, String error) — a context-tagged message that includes the specific error.

LWC Utilities

Import these from the FCORE_BASE namespace in Lightning web components:
  • toastUtilsshowSuccessToast(...) and showErrorToast(...) for consistent toast notifications.
  • ldsUtilsreduceErrors(error) flattens a server/LDS error into a readable message list.
  • deviceUtilsisMobile() reports whether the component is running on a mobile device.