리스트 구성기를 직접 생성하기

🔸 Component 직접 생성

빌더를 통한 탭 생성 이외에도 Aura Component <SBLS:ListConfigurator />를 사용하여 원하는 위치에 리스트 구성기를 추가할 수 있습니다.

<aura:component >
    <SBLS:ListConfigurator configurationId="{빌더 레코드 ID}" />
</aura:component>

🔸 Aura Component 속성

속성
설명

configurationId

빌더의 레코드 ID입니다.

height

구성기의 높이(단위: px)입니다. 기본값은 500px입니다.

parentFieldApiName

레코드 페이지의 관련 목록(Related List)으로 추가할 경우, 해당 레코드 페이지 개체와 리스트 구성기 개체 간 참조된 필드의 API명을 설정합니다.

recordId

레코드 페이지의 관련 목록으로 추가할 경우, 해당 레코드 페이지 개체의 recordId를 설정합니다.

hideFilters

설정한 필터를 숨깁니다.

리스트에 적용할 기본 필터 조건을 설정하고 싶을 경우 filters 속성을 사용합니다. 이 속성은 JSON 배열 형식으로 필터 값을 전달하며, 리스트가 로드될 때 자동으로 해당 조건이 적용됩니다.


🔸 Component 작성 예시

Tab을 위한 Component 생성하기

조직 또는 프로필에 IP 제한이 설정되어 있는 경우, 빌더의 탭 생성 기능을 사용할 수 없습니다. 이럴 때는 Aura Component를 직접 작성하여 탭을 생성해야 합니다.

<aura:component implements="force:appHostable">
    <SBLS:ListConfigurator configurationId="{빌더 레코드 ID}" height="null" />
</aura:component>

관련 목록을 위한 Component 직접 생성하기

기회(Opportunity) 레코드 페이지에 기회 제품(OpportunityLineItem)에 대한 리스트 구성기를 직접 Aura Component를 사용하여 삽입하려는 경우, 아래와 같이 작성합니다.

<aura:component implements="force:hasRecordId">
    <SBLS:ListConfigurator 
        configurationId="{빌더 레코드 ID}"
        parentFieldApiName="OpportunityId"
        recordId="{!v.recordId}" />
</aura:component>

필터 값 전달하기

예를 들어, Opportunity Product에 대한 리스트를 보여주는 OpportunityProductList.cmp라는 Aura Component가 있다고 가정해 보겠습니다.

OpportunityProductList.cmp
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
    <SBLS:ListConfigurator 
        configurationId="{빌더 레코드 ID}"
        parentFieldApiName="OpportunityId"
        recordId="{!v.recordId}" />
</aura:component>
OpportunityProductList.cmp

Opportunity Product 리스트에는 제품 코드(ProductCode), 수량(Quantity), 날짜(ServiceDate) 필터가 있습니다. 각 필터들의 기본 값은 다음과 같이 설정합니다:

  • ProductCode: ‘CLOUD’가 포함 됨

  • Quantity: 1보다 큼

  • ServiceDate: 2025-06-01 ~ 2025-12-31

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
    <aura:attribute name="filters" type="Object" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <SBLS:ListConfigurator 
        configurationId="{빌더 레코드 ID}"
        parentFieldApiName="OpportunityId"
        recordId="{!v.recordId}"
        filters="{!v.filters}" />
</aura:component>
  • filters 속성은 리스트에 기본 필터 조건을 설정할 때 사용되며, JSON 배열 형식으로 전달됩니다. 리스트가 처음 로드될 때 자동으로 해당 필터가 적용됩니다.

  • <aura:handler name="init" />를 사용하여 구성요소가 로드 될 때 filters 값을 할당합니다.

OpportunityProductListController.js
({
    doInit : function(component, event, helper) {
        component.set("v.filters", [
            {
                fieldApiName: 'ProductCode',
                value: 'CLOUD'
            },
            {
                fieldApiName: 'Quantity',
                value: 1,
                operator: 'greater_than'
            },
            {
                fieldApiName: 'ServiceDate',
                value: {
                    from: '2025-06-01',
                    to: '2025-12-31'
                }
            }
        ]);
    }
})

리스트에서 구성요소에 설정한 필터 값이 적용한 것을 확인하실 수 있습니다.

OpportunityProductList.cmp 필터 적용 결과

filters 속성

속성

fieldApiName

필터를 적용할 필드의 API 이름입니다.

value

필터 값입니다. 숫자 또는 날짜 범위의 경우 from, to 속성을 포함한 객체 형태로 설정합니다.

operator

숫자 필터 등에서 비교 연산자를 설정할 때 사용합니다. (옵션) 적용할 수 있는 연산자 값은 다음과 같습니다:

  • equals: 같음

  • not_equal_to: 같지 않음

  • less_than: 보다 작음

  • greater_than: 보다 큼

  • less_or_equal: 작거나 같음

  • greater_or_equal: 크거나 같음

Last updated

Was this helpful?