오 통과ㅋ
trigger AccountAddressTrigger on Account (before insert, before update) {
//BillingPostalCode
//ShippingPostalCode
//Match_Billing_Address__c is true,
// 위는 정확한 API명
//billing postal code true && match_billing accress__c true일 때
//shipping postal code를 세팅할 것
for(Account a : Trigger.New) {
if(a.Match_Billing_Address__c == true && a.BillingPostalCode != '') {
a.ShippingPostalCode = a.BillingPostalCode;
}
}
}
'Salesforce > Trailhead' 카테고리의 다른 글
[Developer Beginner] Apex Testing | Test Apex Triggers (0) | 2021.03.22 |
---|---|
[Developer Beginner] Apex Testing | Get Started with Apex Unit Tests (0) | 2021.03.22 |
[Developer Beginner] Apex Triggers | Bulk Apex Triggers (0) | 2021.03.22 |
[Developer Beginner] Apex Basics & Database | Write SOQL Queries (0) | 2021.03.19 |
Developer Beginner | Apex Basics & Database | Manipulate Records with DML (0) | 2021.03.19 |
댓글