Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam CRT-450 All Questions
Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Salesforce Developers CRT-450 Question # 21 Topic 3 Discussion

CRT-450 Exam Topic 3 Question 21 Discussion:
Question #: 21
Topic #: 3

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

What is the correct implementation?


A.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(Trigger.new);

}


B.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(trigger.new);

}


C.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}


D.

apex

CopyEdit

trigger RequestTrigger on Request__c (after insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}


Get Premium CRT-450 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.