What is the correct implementation?

A developer needs to prevent the creation of Request_c records when certain conditions exist in the system. A RequestLogic class exists to checks the conditions.

What is the correct implementation?
A . Trigger RequestTrigger on Request (after insert) { RequestLogic.validateRecords {trigger.new}; }
B . Trigger RequestTrigger on Request (before insert) { RequestLogic.validateRecords {trigger.new}; }
C . Trigger RequestTrigger on Request (before insert) { if (RequestLogic.isvalid{Request})
Request.addError {‘Your request cannot be created at this time.’}; }
D . Trigger RequestTrigger on Request (after insert) { if (RequestLogic.isValid{Request})
Request.addError {‘Your request cannot be created at this time.’}; }

Answer: B

Latest PDI Practice Questions with 191 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments