Skip to main content

BB Fields Function

bb_fields is a special soql function, designed after soql standard function fields but with enhanced capabilities.

Function syntax is bb_fields(arg1, arg2, ... argN) where each arg indicates a set of fields to be matched.

  • all: This is similar to the standard function fields(all), which includes all fields. Note that this is same as select * from.
  • standard: This is similar to the standard function fields(standard), which includes all standard fields
  • custom: This is similar to the standard function fields(custom), which includes all custom fields
  • type_<Field Type> where Field Type is field type. All possible values are shown below.
Argument ListArgument ListArgument ListArgument List
type_addresstype_multipicklisttype_datetimetype_rollup
type_autonumbertype_numbertype_emailtype_text
type_booleantype_percenttype_formulatype_textarea
type_currencytype_phonetype_locationtype_textarealong
type_datetype_picklisttype_lookuptype_textarearich

For ex.,

  • select bb_fields(type_lookup, type_date) from account; selects all Lookup and Date fields from Account
  • select bb_fields(type_lookup, custom) from account selects all Lookup and Custom Fields from Account;