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).
Parameters:
column_id_optional- if leave empty or set tonull, 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 tonull, 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:
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.
COLUMNTOTAL() returns a total number of records in the current column.
COLUMNTOTAL({$Variables.myColumnId}, 'Type = {QUOTE}Electrical{QUOTE}') will return total number of records that match custom filter Type='Electrical' and belong to column with ID stored in variable "myColumnId".
Let Priority = picklist with these values: 'High', 'Medium', 'Low', 'No priority'.
COLUMNTOTAL(null, null, 'MAX', 'Priority') returnั 'No priority' because it is the latest value in picklist field.
COLUMNTOTAL(null, null, 'MIN', 'Units') returns the minimal number value if the field is numeric, and first alphabetically sorted value if the field is text.
COLUMNTOTAL({$Variables.myColumnId}, 'Stage = {QUOTE}Closed Won{QUOTE}', 'AVG', 'ExpectedRevenue__ั') returns average Expected Revenue amount for opportunities in Closed Won stage.
2. BUILDFORMLINK
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 torecord_id- ID of record to be used as data sourcemode- 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 formentire_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 elementsas_html_tag_optional- optional argument. If set to true, not only form URL will be generated, but HTML tag<a>withhrefattribute equal to this URLtext_optional- optional argument. If set to any text except null, this text will be placed as inner content of<a>tag (has sense only ifas_html_tag_optionalis set to true)
Let your application is located at your-app-url.com address.
BUILDFORMLINK('a0C9m00000T4LvWDFC', '5001A00000SdeRqQFF', 'edit') returns the following URL:
https://your-app-url.com/lightning/cmp/c__FormPanel?c__entireHeight=false&c__formId=a0C9m00000T4LvWDFC&c__mode=edit&c__recordId=5001A00000SdeRqQFFLet your application is located at your-app-url.com address.
BUILDFORMLINK('a0C9m00000T4LvWDFC','5001A00000SdeRqQFF','edit', null,'{"aaa":"bbb"}',false,true) returns the following HTML code:
<a href="https://your-app-url.com/lightning/cmp/c__FormPanel?c__entireHeight=false&c__formId=a0C9m00000T4LvWDFC&c__mode=edit&c__parameters=%7B%22aaa%22%3A%22bbb%22%7D&c__recordId=5001A00000SdeRqQFF">https://your-app-url.com/lightning/cmp/c__FormPanel?c__entireHeight=false&c__formId=a0C9m00000T4LvWDFC&c__mode=edit&c__parameters=%7B%22aaa%22%3A%22bbb%22%7D&c__recordId=5001A00000SdeRqQFF</a>Let your application is located at your-app-url.com address.
BUILDFORMLINK('a0C9m00000T4LvWDFC','5001A00000SdeRqQFF','edit', '{"inputTextarea":"This is some description"}', null, false, true, 'My Link Text') returns the following HTML code:
<a href="https://your-app-url.com/lightning/cmp/c__FormPanel?c__contextFields=%7B%22inputTextarea%22%3A%22This+is+some+description%22%7Dc__entireHeight=false&c__formId=a0C9m00000T4LvWDFC&c__mode=edit&c__recordId=5001A00000SdeRqQFF">My Link Text</a>3. BUILDDASHBOARDLINK
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 tovariables- JSON with the list of variables to be passed to dashboard. This argument is mandatory, so, replace it withnullif no variables needed.styles- string with CSS properties to be passed to dashboard. This argument is mandatory, so, replace it withnullif 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>withhrefattribute 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 ifas_html_tag_optionalis set to true)
Let your application is located at your-app-url.com address.
BUILDDASHBOARDLINK('a003m00002CvxffAAB','{"myVariable_1":"Some text"}',null) returns the following URL:
https://your-app-url.com/lightning/cmp/c__KanBanComponent?c__kanbanId=a003m00002CvxffAAB&c__variables=%7B%22myVariable_1%22%3A%22Some+text%22%7DBUILDDASHBOARDLINK('a003m00002CvxffAAB',null,null,true) returns the following HTML code:
<a href="https://your-app-url.com/lightning/cmp/c__KanBanComponent?c__kanbanId=a003m00002CvxffAAB">https://your-app-url.com/lightning/cmp/c__KanBanComponent?c__kanbanId=a003m00002CvxffAAB</a>BUILDDASHBOARDLINK('a003m00002CvxffAAB','{"myVariable_1":"Some text"}',null,true,'My Dashboard') returns the following HTML code:
<a href="https://your-app-url.com/lightning/cmp/c__KanBanComponent?c__kanbanId=a003m00002CvxffAAB&c__variables=%7B%22myVariable_1%22%3A%22Some+text%22%7D">My Dashboard</a>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 totrue, 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.
Let your user has these permissions: User_Test_Permission, Process_admin.
CHECKPERMISSION('User_Test_Permission') returnั true if current user has this permission.
CHECKPERMISSION(SPLIT('User_Test_Permission,Process_admin', ',')) returns true if current user has both these permissions.
CHECKPERMISSION(SPLIT('User_Test_Permission,Process_admin', ','),false) returns true if current user has both these permissions.
CHECKPERMISSION(SPLIT('User_Test_Permission,Process_admin', ','),true) returns true if current user has at least one of these 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.
USERIN({$User.id}, 0083n000008qatjCVV) returns true if current user ID is equal to second parameter.
USERIN({$User.id}, ('0083n000008qatjCVV,00G3m000003pllF')) returns true if current user ID is in the listed IDs.
Last updated