Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 260 discussion

Actual exam question from Salesforce's CRT-450
Question #: 260
Topic #: 1
[All CRT-450 Questions]

A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?

  • A. @InvocableMethod
    global static List> getLevel(List input)
    { /*implementation*/ }
  • B. @InvocableMethod
    global Recommendation getLevel(ContactWrapper input)
    { /*implementation*/ }
  • C. @InvocableMethod
    global List> getLevel(List input)
    { /*implementation*/ }
  • D. @InvocableMethod
    global static ListRecommendation getLevel(List input)
    { /*implementation*/ }
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
irina_735
1 year, 2 months ago
The invocable method must be static and public or global. There can be at most one input parameter of type List. If the return type isn’t Null, the data type returned by the method must be List: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm So the correct answer should be like : @InvocableMethod global static List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /*implementation*/ }
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...