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*/ }
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
...
Log in to ExamTopics
Sign in:
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.
irina_735
1 year, 2 months ago