CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 122: Certified Platform Developer II

What is a potential design issue with the following code?trigger accountTrigger on Account (before update){ Boolean processOpportunity = false; List opptysClosedLost = new List () List IstAllOpp = [select StageName from Opportunity where accountId IN :Trigger.newMap.keySet()]; if(!IstAllOpp.isEmpty()) processOpportuni…

Nội dung câu hỏi

What is a potential design issue with the following code?trigger accountTrigger on Account (before update){ Boolean processOpportunity = false; List opptysClosedLost = new List () List IstAllOpp = [select StageName from Opportunity where accountId IN :Trigger.newMap.keySet()]; if(!IstAllOpp.isEmpty()) processOpportunity = true; while(processOpportunity){ for(opportunity o : IstAllOpp) if(o.StageName == 'Closed - Lost') opptysClosedLost.add(o); processOpportunity = false; if(!opptysClosedLost.isEmpty()) delete opptysClosedLost;

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
  2. B. The code will result in a System.LimitException : Too many script statements error
  3. C. The code will result in a System.DmlException:Entity_is_Deleted error
  4. D. The code will result in a System.LimitException: Apex CPU time limit exceeded error — đáp án hiện tại

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề