# 기본

**Salesforce 내 관련 개체를 조회하여 데이터를 같이 표현하고 싶을 때 사용됩니다.**

<figure><img src="/files/bwg2w10UTnLt0DkSAHeX" alt=""><figcaption></figcaption></figure>

예를 들어 Lookup이 Product2로 지정된 경우 PricebookEntry에 있는 단가를 같이 표시하고 싶을 때 내부 데이터소스를 이용해 조건에 맞는 PricebookEntry를 조회하여 제품과 단가를 같이 표현할 수 있습니다.

* [**속성**](#undefined)

  Internal 데이터소스를 사용하기 위한 각 속성입니다.
* [**Action**](#action)

  Internal Data Source를 통해 가져온 데이터를 Lookup 또는 Line-Item에 매핑하기 위한 작업입니다.
* [**예시**](#undefined-1)

***

### 속성

Internal 데이터소스를 사용하기 위한 각 속성입니다.

<table><thead><tr><th width="192">항목</th><th width="605.3333333333333">설명</th><th>필수</th></tr></thead><tbody><tr><td>Source Object</td><td>Lookup 또는 Line-Item의 데이터와 매핑할 세일즈포스 내부 개체를 지정합니다.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Query</td><td>Wizard 버튼을 눌러 Query 작성 레이아웃을 엽니다. Query Wizard를 이용해 조건문에 사용할 필드를 검색하여 쉽게 작성할 수 있습니다.</td><td></td></tr><tr><td>Active</td><td>Data Source를 사용하려면 활성화해야 합니다.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Evaluation Event</td><td><p>Line-Item 편집기는 Evaluation Event를 필수로 설정해주어야 합니다.</p><ul><li>On Initialization : Line-Item 레코드가 새로 추가되었을 때 실행됩니다.</li><li>On Loading : Line-Item 화면이 로드될 때마다 실행됩니다.</li><li>Before Save : Line-Item 레코드들이 저장되기 전 실행됩니다.</li></ul></td><td></td></tr><tr><td><a href="#action"><strong>Actions</strong></a></td><td>Internal Data Source를 통해 가져온 데이터를 Lookup 또는 Line-Item에 매핑하기 위한 작업입니다.</td><td><mark style="color:red;">✔️</mark></td></tr></tbody></table>

### Action

Internal Data Source를 통해 가져온 데이터를 Lookup 또는 Line-Item에 매핑하기 위한 작업입니다.

<table><thead><tr><th width="183">항목</th><th width="466.33333333333326">설명</th><th>필수</th></tr></thead><tbody><tr><td>Action Order</td><td>매핑 순서를 지정합니다.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Source Field</td><td>Internal Data Source 개체에서 매핑할 필드를 지정합니다.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Target Field</td><td>Lookup 또는 Line-Item 개체에 매핑할 필드를 지정합니다.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Key</td><td><p>Lookup 또는 Line-Item과 데이터소스 간 데이터 매칭 시 사용할 Action을 지정합니다.</p><p>예를 들어 Lookup이 Product2로 지정되어 있고 데이터소스로 PricebookEntry를 가져오는 경우 PricebookEntry의 Product2Id(Source Field)와 Product2의 Id 필드(Target Field)로 데이터를 결합하여 표현합니다.</p></td><td><mark style="color:red;">✔️</mark></td></tr></tbody></table>

### 예시

Lookup Selector 개체를 Product로 지정하여 제품 목록을 검색하려고 합니다. 해당 목록에 PricebookEntry 개체에 있는 단가를 함께 표시하려고 합니다.

1. 데이터소스에서 Source Object를 PricebookEntry로 지정합니다.
2. (선택) Query Wizard를 눌러 데이터 조회 조건을 작성합니다. (SOQL `Where`문과 동일)
3. Product에 맞는 PricebookEntry 데이터를 결합하기 위해 아래와 같이 설정합니다.
   * Source Field : Product2Id
   * Target Field : Id
   * Key : true
4. 단가를 Product 데이터와 같이 표시하기 위해 Action을 추가하여 Lookup Column을 지정합니다.
   * Source Field : UnitPrice
   * Target Field : SBLDVirtual1 ([Lookup Virtual Column 참고](/ko/smallbuilder-line-items/builder/setup/setup-lookup-selector.md#virtual-column))

<figure><img src="/files/iMt9bu1VWMwYAeZOJcS1" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/gvYQZjgC3eziC2h8cENA" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.smallbuilder.com/ko/smallbuilder-line-items/builder/setup/datasource/internal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
