System

1. COLUMNTOTAL

Calculates total quantities of records or evaluates total amounts / minimal values / maximal values / averages of values in the specified or current column considering column conditions and filters applied.

COLUMNTOTAL(column_id_optional, filter_optional, aggregation_type_optional, aggregation_field_optional).

All function parameters are optional and can be omitted (if last) or should be replaced with null (if not needed, but some arguments are to be placed after them).

Parameters:

  • column_id_optional - if leave empty or set to null, will calculate desired values for current column. If specify column ID, will calculate result for that column (this argument is necessary if column is unknown in current context, e.g., when function is executed on some cell in the Kanban header).

  • filter_optional - if specify, will add custom filter string to query and calculate result matching this filter.

  • aggregation_type_optional - if leave empty or set to null, will calculate total quantity of records matching the query, otherwise will calculate values with the way specified by proper aggregate function (see table below for a list and a SOQL syntax web reference for more help).

  • aggregation_field_optional - API name of the field, should be specified when using aggregation types because of different aggregation functions support only fields of specific types.

List of aggregation types:

Aggregation functionReturned resultIgnores null values?Supported field types

COUNT

Number of records matching the query criteria (actually the same result as for empty or null proper argument).

No (if aggregation field is ID or is not specified) Yes (if other aggregation field is specified)

Any

COUNT_DISTINCT

Number of distinct non-null field values matching the query criteria.

Yes

Any

AVG

Average value of a numeric field.

Yes

Numeric

SUM

Total sum of a numeric field.

Yes

Numeric

MIN

Minimum value of a field.

Yes

Any. If use on a picklist field, the function uses the sort order of the picklist values instead of alphabetical order.

MAX

Maximum value of a field.

Yes

Any. If use on a picklist field, the function uses the sort order of the picklist values instead of alphabetical order.

Builds a web URL to specified Form.

BUILDFORMLINK(form_id, record_id, mode, context_fields, parameters, entire_height, as_html_tag_optional, text_optional)

Parameters:

  • form_id - ID of form to be linked to

  • record_id - ID of record to be used as data source

  • mode - form mode (edit, view or new)

  • context_fields - JSON with the list of virtual fields and their values (for pre-population)

  • parameters - JSON with parameters that will be passed to the form

  • entire_height - true or false. If set to true, form will take all available height of container, even if no such space required to show form elements

  • as_html_tag_optional - optional argument. If set to true, not only form URL will be generated, but HTML tag <a> with href attribute equal to this URL

  • text_optional - optional argument. If set to any text except null, this text will be placed as inner content of <a> tag (has sense only if as_html_tag_optional is set to true)

Note: if omit record_id argument, form will be shown without object fields populated. If the form mode is "edit", it will be the same result as for "new" mode.

Builds a web URL to specified Kanban.

BUILDDASHBOARDLINK(dashboard_id, variables, styles, as_html_tag_optional, text_optional)

Parameters:

  • dashboard_id - ID of dashboard (kanban) to be linked to

  • variables - JSON with the list of variables to be passed to dashboard. This argument is mandatory, so, replace it with null if no variables needed.

  • styles - string with CSS properties to be passed to dashboard. This argument is mandatory, so, replace it with null if no styles needed.

Note: styles argument is actually passed as URL parameter, but does not supported by Kanban page (reserved for future use).

  • as_html_tag_optional - optional argument. If set to true, not only dashboard URL will be generated, but HTML tag <a> with href attribute equal to this URL.

  • text_optional - optional argument. If set to any text except null, this text will be placed as inner content of <a> tag (has sense only if as_html_tag_optional is set to true)

4. CHECKPERMISSION

Returns true if current user has listed permissions (all or at least one) or false if not.

CHECKPERMISSION(name_or_names_json_array, atleastone_boolean_optional)

Parameters:

  • name_or_names_json_array - name of the permission to be checked or JSON array of permission names.

  • atleastone_boolean_optional - if set to true, function will return true if current user has at least one permission from the array in first agrument, otherwise (or if omitted) function will return true only if current user has all listed permissions.

5. USERIN

Returns true if given user belongs to at least one of listed users, roles, profiles, queues or groups.

USERIN(user_id, users_roles_profiles_groups_ids).

Parameters:

  • user_id - ID of user which is being checked.

  • users_roles_profiles_groups_ids - one ID or list of IDs of of users/roles/profile/group/queue.

Last updated