๊ฐœ์ฒด ์„ค์ • (Relate Objects)

Line-item Configurator๋ฅผ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋จผ์ € Parent ๊ฐœ์ฒด, Line-item ๊ฐœ์ฒด, Lookup ๊ฐœ์ฒด๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

์ฐธ๊ณ ๋กœ ๊ธฐํšŒ์—์„œ ์ œํ’ˆ Line-item Configurator๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๊ฒฝ์šฐ Parent Object๋Š” ๊ธฐํšŒ ๊ฐœ์ฒด๋กœ Line-item ๊ฐœ์ฒด๋Š” ๊ธฐํšŒ ์ œํ’ˆ์œผ๋กœ ์„ค์ •ํ•˜๋ฉฐ ์ œํ’ˆ(Product)์„ Lookup ๊ฐœ์ฒด๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ•ญ๋ชฉ์„ค๋ช…ํ•„์ˆ˜

Parent Object

๊ธฐํšŒ, ๊ฒฌ์ , ์ถœ์žฅ ๋“ฑ Line-item Configurator๋ฅผ ์ถ”๊ฐ€ํ•  ๊ฐœ์ฒด๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

โœ”๏ธ

Line-item Object

๊ธฐํšŒ ์ œํ’ˆ, ๊ฒฌ์  ํ–‰์•„์ดํ…œ, ์ถœ์žฅ ๋ชฉ์ ์ง€ ๋“ฑ Parent Object์˜ ์ž์‹ ๊ฐœ์ฒด๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

โœ”๏ธ

Lookup Object

์ œํ’ˆ, ๊ฑฐ๋ž˜์ฒ˜ ๋“ฑ Line-item์ด ์ฐธ์กฐํ•˜๋Š” ๊ฐœ์ฒด๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ’ก Tip Line-Item Editor๋งŒ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ Block adding items๋ฅผ ์„ ํƒํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์กฐ๊ฑด์— ๋”ฐ๋ผ ์ œ์–ดํ•˜๋ ค๋ฉด ๋ฐ”๋กœ ์•„๋ž˜์— ๋ณด์ด๋Š” ์ž…๋ ฅ๋ž€์— Parent ํ•„๋“œ์˜ API ๋ช…์„ ๊ธฐ์žฌํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. (ํ•„๋“œ๊ฐ’์€ true ๋˜๋Š” false์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.)

โœ”๏ธ

Line-item Object Advanced Setting

Line-Item Editor์—์„œ ์ €์žฅ๋œ ๋ ˆ์ฝ”๋“œ ๋ถˆ๋Ÿฌ์˜ฌ ์‹œ ์ •๋ ฌ ์ง€์ • ๋ฐ ์‚ญ์ œ ์ œ์–ด ๋“ฑ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ•ญ๋ชฉ์„ค๋ช…

Order By

์ €์žฅ๋œ Line-Item์˜ ๋ ˆ์ฝ”๋“œ๋ฅผ ๋ถˆ๋Ÿฌ์˜ฌ ์‹œ ์ •๋ ฌ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

SOQL์˜ ORDER BY ์ ˆ์„ ๊ธฐ์žฌํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์ตœ๊ทผ์— ์ƒ์„ฑ๋œ ๋‚ ์งœ(ํ•„๋“œ: CreatedDate) ์ˆœ์œผ๋กœ ๋‚ด๋ฆผ์ฐจ์ˆœ ์ •๋ ฌํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ CreatedDate DESC๋กœ ๊ธฐ์žฌํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

Delete Controller Field

์ง€์ •ํ•œ ํ•„๋“œ ๊ฐ’์— ๋”ฐ๋ผ Line-Item ๋ ˆ์ฝ”๋“œ ์‚ญ์ œ๋ฅผ ์ œ์–ดํ•ฉ๋‹ˆ๋‹ค. Line-Item ํ•„๋“œ์—ฌ์•ผ ํ•˜๊ณ , ํ•ด๋‹น ํ•„๋“œ๊ฐ’์€ true ๋˜๋Š” false ์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด Parent ๋˜๋Š” Lookup์˜ ์ƒํƒœ ๊ฐ’์— ๋”ฐ๋ผ Line-Item ๋ ˆ์ฝ”๋“œ ์‚ญ์ œ๋ฅผ ์ œ์–ดํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ, Line-Item ๊ฐœ์ฒด์— Booleanํ˜• ์ˆ˜์‹ ํ•„๋“œ๋ฅผ ๋งŒ๋“ค์–ด ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Lookup Object Filter

Lookup Selector ๊ฒ€์ƒ‰ ์‹œ ํ‚ค์›Œ๋“œ ๋งค์นญ ๋ฐฉ๋ฒ• ๋ฐ ํ•„ํ„ฐ ๋“ฑ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ•ญ๋ชฉ์„ค๋ช…ํ•„์ˆ˜

Keyword Field

Lookup ๋ ˆ์ฝ”๋“œ ๊ฒ€์ƒ‰ ํ‚ค์›Œ๋“œ๋กœ ์‚ฌ์šฉํ•  ํ•„๋“œ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

โœ”๏ธ

Match Condition

ํ‚ค์›Œ๋“œ ๊ฒ€์ƒ‰ ๋ฐฉ์‹์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  • Contains - ํ‚ค์›Œ๋“œ๊ฐ€ ํฌํ•จ๋œ ๊ฐ’์„ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค.

  • Start with - ํ‚ค์›Œ๋“œ๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฐ’์„ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋ณธ๊ฐ’ : Contains

โœ”๏ธ

Order By

Lookup ๊ฒ€์ƒ‰ ์‹œ ์ •๋ ฌ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

SOQL์˜ ORDER BY ์ ˆ์„ ๊ธฐ์žฌํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์ œํ’ˆ ์ฝ”๋“œ(ํ•„๋“œ: ProductCode) ์ˆœ์œผ๋กœ ์˜ค๋ฆ„์ฐจ์ˆœ ๊ฒ€์ƒ‰ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ ProductCode ASC๋กœ ๊ธฐ์žฌํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

Advanced Condition

๊ฒ€์ƒ‰ ์กฐ๊ฑด์„ ๋ฏธ๋ฆฌ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. SOQL์˜ WHERE ์ ˆ์„ ๊ธฐ์žฌํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ํ™œ์„ฑํ™”(ํ•„๋“œ: IsActive)๋œ ๋ ˆ์ฝ”๋“œ๋งŒ ์กฐํšŒํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ IsActive = true๋กœ ๊ธฐ์žฌํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๐Ÿ’ก Tip Parent์˜ ํ•„๋“œ๊ฐ’์„ ์กฐ๊ฑด๋ฌธ์— ์ง€์ •ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ {$Parent.ํ•„๋“œ๋ช…}๋ฅผ ์ด์šฉํ•ด ๋ฐ”์ธ๋”ฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ) Lookup Selector ๊ฒ€์ƒ‰ ์‹œ ๊ธฐ์ค€์„ Parent์˜ ํ†ตํ™”์™€ ์ผ์น˜ํ•œ ๋ ˆ์ฝ”๋“œ๋งŒ ์กฐํšŒํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ ์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. CurrencyIsoCode = {$Parent.CurrencyIsoCode}

Last updated