Skip to main content
10๋ถ„๋งŒ ์‹œ๊ฐ„์„ ๋‚ด์–ด ์ปค๋ฎค๋‹ˆํ‹ฐ ์„ค๋ฌธ์กฐ์‚ฌ์— ์ฐธ์—ฌํ•ด ์ฃผ์„ธ์š”. ์ง€๊ธˆ๋ถ€ํ„ฐ 7์›” 19์ผ๊นŒ์ง€ ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค. ์ฐธ์—ฌํ•˜์‹œ๋ ค๋ฉด ์—ฌ๊ธฐ๋ฅผ ํด๋ฆญํ•ด ์ฃผ์„ธ์š”.

๋ชฉ๋ก ๋งŒ๋“ค๊ธฐ

์ฐธ๊ณ 

์ฐธ๊ณ 

ํ•œ๊ตญ์–ด๋กœ ํ•™์Šตํ•˜์‹œ๊ฒ ์–ด์š”? Trailhead playground์—์„œ ํ•œ๊ตญ์–ด๋กœ ์‹ค์Šต ๊ณผ์ œ๋ฅผ ์‹œ์ž‘ํ•˜๊ณ , ๊ด„ํ˜ธ ์•ˆ์— ์ œ๊ณต๋œ ๋ฒˆ์—ญ์„ ์‚ฌ์šฉํ•ด ํƒ์ƒ‰ํ•ด ๋ณด์„ธ์š”. ์˜์–ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์‹ค์Šต ๊ณผ์ œ ๊ฒ€์ฆ์ด ์ด๋ฃจ์–ด์ง€๋ฏ€๋กœ ์˜๋ฌธ์œผ๋กœ ํ‘œ์‹œ๋œ ๊ฐ’๋งŒ ๋ณต์‚ฌํ•ด ๋ถ™์—ฌ ๋„ฃ์Šต๋‹ˆ๋‹ค. ํ•œ๊ตญ์–ด ์กฐ์ง์—์„œ ์‹ค์Šต ๊ณผ์ œ๋ฅผ ํ†ต๊ณผํ•˜์ง€ ๋ชปํ•œ ๊ฒฝ์šฐ, (1) ๋กœ์บ˜์„ ๋ฏธ๊ตญ์œผ๋กœ ๋ฐ”๊พธ๊ณ  (2) ์—ฌ๊ธฐ์— ์ œ์‹œ๋œ ์ง€์นจ์— ๋”ฐ๋ผ ์–ธ์–ด๋ฅผ ์˜์–ด๋กœ ๋ฐ”๊พผ ํ›„ (3) "Check Challenge(๊ณผ์ œ ํ™•์ธ)" ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ๋‹ค์‹œ ์ง„ํ–‰ํ•ด ๋ณด์„ธ์š”.

์›ํ•˜๋Š” ์–ธ์–ด๋กœ Trailhead ์‚ฌ์šฉํ•˜๊ธฐ ๋ฑƒ์ง€๋ฅผ ํ™•์ธํ•ด ํ˜„์ง€ํ™”๋œ Trailhead ๊ฒฝํ—˜์„ ํ™œ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด์„ธ์š”.

Trail Together์™€ ํ•จ๊ป˜ ์•Œ์•„๋ณด๊ธฐ

์ด ๋‹จ๊ณ„๋ฅผ ์ „๋ฌธ๊ฐ€์™€ ํ•จ๊ป˜ ์ง„ํ–‰ํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”? Trail Together ์‹œ๋ฆฌ์ฆˆ์˜ ์ผ๋ถ€์ธ ์ด ๋น„๋””์˜ค๋ฅผ ์‹œ์ฒญํ•˜์„ธ์š”.

(์ด ์˜์ƒ์€ 13๋ถ„ 30์ดˆ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ๋‹จ๊ณ„ ์‹œ์ž‘ ๋ถ€๋ถ„์œผ๋กœ ๋˜๋Œ๋ ค ๋‹ค์‹œ ์‹œ์ฒญํ•˜๋ ค๋Š” ๊ฒฝ์šฐ ์ฐธ๊ณ ํ•˜์„ธ์š”.)

๋ชฉ๋ก ๋งŒ๋“ค๊ธฐ ๋ฐ ์กฐ์ •

์ด๋ฆ„์ด bankAccts์ธ ๋ชฉ๋ก์„ ์ธ์Šคํ„ด์Šคํ™”ํ•˜๊ณ  ๋‘ BankAcct ๊ฐœ์ฒด๋ฅผ ๋ชฉ๋ก์— ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

  1. Execute Anonymous(์ต๋ช… ์‹คํ–‰) ์ฐฝ์„ ์—ฝ๋‹ˆ๋‹ค.
  2. ๊ธฐ์กด ์ฝ”๋“œ๋ฅผ ๋‹ค์Œ ์ฝ”๋“œ๋กœ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.
    //From the BankAcct class, instantiate an object named chkAcct
    BankAcct chkAcct = new BankAcct();
    //Set the accttype attribute of the chkAcct object to Checking
    chkAcct.accttype = 'Checking';
    //Set the acctName attribute of the chkAcct object to D.Castillo-Chk
    chkAcct.acctName = 'D.Castillo-Chk ';
    //Invoke the makeDeposit method with 150 as the argument
    chkAcct.makeDeposit(150);
    //From the BankAcct class, instantiate an object named savAcct
    BankAcct savAcct = new BankAcct();
    //Set the accttype attribute of the savAcct object to Savings
    savAcct.accttype = 'Savings';
    //Set the acctName attribute of the savAcct object to D.Castillo-Sav
    savAcct.acctName = 'D.Castilloโ€“Sav';
    //Invoke the makeDeposit method with 220 as the argument
    savAcct.makeDeposit(220);
    //From the List class, instantiate a BankAcct List object named bankAccts
    List<BankAcct> bankAccts = new List<BankAcct>();
    System.debug('The BankAcct List has ' + bankAccts.size() + ' bank accounts.');
    //Add the chkAcct object to the bankAccts list
    bankAccts.add(chkAcct);
    //Add the savAcct object to the bankAccts list
    bankAccts.add(savAcct);
    System.debug('The BankAcct List has ' + bankAccts.size() + ' bank accounts.');
    System.debug('Here is the list: ' + bankAccts);
  3. Open Log(๋กœ๊ทธ ์—ด๊ธฐ)๊ฐ€ ์„ ํƒ๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•œ ํ›„ Execute(์‹คํ–‰)๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. ์‹คํ–‰ ๋กœ๊ทธ๊ฐ€ ์—ด๋ฆฝ๋‹ˆ๋‹ค.
  4. Debug Only(๋””๋ฒ„๊ทธ๋งŒ)๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  5. ๋””๋ฒ„๊ทธ ๋ฉ”์‹œ์ง€๋ฅผ ๊ฒ€ํ† ํ•œ ํ›„ ๋กœ๊ทธ๋ฅผ ๋‹ซ์Šต๋‹ˆ๋‹ค.

createContact ๋ฉ”์„œ๋“œ์—์„œ Contact List(์—ฐ๋ฝ์ฒ˜ ๋ชฉ๋ก) ๊ฐœ์ฒด๋ฅผ ์ธ์Šคํ„ด์Šคํ™”ํ•˜๊ณ  ์ด๋ฆ„์ด candsFromTrigger์ธ Candidate List(ํ›„๋ณด ๋ชฉ๋ก) ๊ฐœ์ฒด๋ฅผ ์ธ์ˆ˜๋กœ ์ˆ˜๋ฝํ•ฉ๋‹ˆ๋‹ค.ย 

  1. Developer Console์—์„œ CreateContactFromCan ํด๋ž˜์Šค๋ฅผ ์—ด๊ณ  ๊ธฐ์กด ์ฝ”๋“œ๋ฅผ ๋‹ค์Œ ์ฝ”๋“œ๋กœ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.
    public with sharing class CreateContactFromCan {
        //Declare a method that returns void and accepts a Candidate list named candsFromTrigger
        public void createContact (List<Candidate__c> candsFromTrigger){
        //Instantiate a Contact list named conList
        List<Contact> conList = new List<Contact>();
        }
    }
  2. CreateContactFromCan ํด๋ž˜์Šค๋ฅผ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.
Salesforce ๋„์›€๋ง์—์„œ Trailhead ํ”ผ๋“œ๋ฐฑ์„ ๊ณต์œ ํ•˜์„ธ์š”.

Trailhead์— ๊ด€ํ•œ ์—ฌ๋Ÿฌ๋ถ„์˜ ์˜๊ฒฌ์— ๊ท€ ๊ธฐ์šธ์ด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด์ œ Salesforce ๋„์›€๋ง ์‚ฌ์ดํŠธ์—์„œ ์–ธ์ œ๋“ ์ง€ ์ƒˆ๋กœ์šด ํ”ผ๋“œ๋ฐฑ ์–‘์‹์„ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ ์˜๊ฒฌ ๊ณต์œ ํ•˜๊ธฐ