Customize the column to be displayed / Display object using record type

In general, CM KanbanBoard for Salesforce will display all Picklist value designated as “columnFiled” as Column.

However, if you are using the record type, there are some cases thatPicklist value differ depending on the record type. Moreover, some of you may not want to display specific Status on KanbanBoard (ex. you may not want to display lost Opportunity…).

In order to correspond to such cases, CM KanbanBoard for Salesforce has a attribute called “columnOptions”. “columnOptions” can answer to following cases.

  • Want to show only the Column that can be used with the record type
  • Want to change the order of Column
  • Do not want to display specific Column

These cannot be configured at Lightning Application Builder. They are only available when you use CM KanbanBoard for Salesforce by developing Lightning Application and Lightning Component.

This document will explain how to display object on CM KanbanBoard for Salesforce that is configured to apply different value for different record type of Picklist value and how to configure Column that only displays the available value using “columnOptions”.

Prerequisite

As shown in the following: assume [Status] for [ToDo (Task)] object’s Picklist field is configured to apply different value depending on the record type.

Record Type Status
Default Not Started
– In Progress
– Completed
– Waiting on someone else
– Deferred
Inquiry Not Started
Writing first response
Corresponding
Escalation
Completed
Deferred
Waiting on someone else

Goal

Display [ToDo (Task)] object on CM KanbanBoard for Salesforce by using [Status] as column.

As shown below, if you choose [Default] filter, only the record type which can be used in [Default] record type will be displayed. And if you choose [Inquiry] filter, you can configure CM KanbanBoard for Salesforce to display only the status which can be used in [Inquiry] record type to be displayed as column.

Configuration Procedure

Refer to Salesforce Help and develop following Lightning App using developer console.

Past the following code in Lightning Application you created:

<aura:application >
  <cmkanban:kanbanBoardApp object="Task"
    columnField="Status"
    cardTitleField="Subject"
    cardField1="What.Name"
    cardField2="ActivityDate"
    cardField3="Owner.Name"
    query1="Default : RecordType.Name='Default'"
    query2="Inquiry : RecordType.Name='Inquiry'"
    columnOptions='[
      {
        "labels": ["Not Started","Waiting on someone else","In Progress","Completed","Deferred"],
        "queries": ["query1"]
      },
      {
        "labels": ["Not Started","Waiting on someone else","Writing first response","Corresponding","Escalation","Completed","Deferred"],
        "queries": ["query2"]
      }
    ]'
  />
</aura:application>

This will create the application that is described in the Goal.

Description

In the configuration of “query1” WHERE clause, by designating “RecordType.Name=’Default’”, only “Default” record type object will be acquired. This is the same with “query2”.

The configuration of “columnOptions” is as follows:

columnOptions='[
  {
    "labels": [designate picklist value to be displayed as array],
    "queries": [designate filter displayed in column designated as "labels" as array]
  },
  {
  ...
  }
]

Column will be displayed in order as the value described in “labels”. Please note that this configuration will not interlock even if you edit the record type, picklist value at Salesforce. So, you need to edit both.

If no “queries” were selected as filter, all values of picklist field will be displayed as column. (This is same operation with not designating columnOptions)