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 329 discussion

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

Einstein Next Best Action is configured at Universal Containers to display recommendations to internal users on the Account detail page.

If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.

Which three factors should a developer keep in mind when implementing the Apex method? (Choose three.)

  • A. The method must use the @AuraEnabled annotation.
  • B. The method must use the @InvokableMethod annotation.
  • C. The method must be defined as static.
  • D. The method must be defined as public.
  • E. The method must use the @Future annotation
Show Suggested Answer Hide Answer
Suggested Answer: ACD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Ke_James0302
1 month, 1 week ago
Selected Answer: ABC
A. The method must use the @AuraEnabled annotation. The @AuraEnabled annotation makes the method accessible in Lightning components, which is necessary for Einstein Next Best Action. B. The method must use the @InvokableMethod annotation. The @InvokableMethod annotation allows the method to be called from Flows or Einstein Next Best Action. C. The method must be defined as static. The method needs to be static when using @InvokableMethod to ensure it can be called without creating an instance of the class. D. The method must be defined as public. The method doesn't have to be public, but it must be accessible to the relevant components or processes.
upvoted 1 times
...
tuananhbgbg
11 months, 4 weeks ago
Selected Answer: BCD
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm As explained in the intro and in considerations @Invocable method must be static and public or global
upvoted 1 times
...
Keiyo
1 year, 1 month ago
C. The method must be defined as static: To be callable from an external context or as part of an invocable action, the method should be defined as static. D. The method must be defined as public: The method should be defined as public so that it can be accessed from outside of the class. E. The method must use the @Future annotation: To perform a callout to an external system asynchronously, the method should use the @Future annotation. This allows the method to run in the background without blocking the main transaction.
upvoted 2 times
...
BrucePark
1 year, 3 months ago
Ok... I think the Apex method in the context is about the callout. Then CDE are a correct answer.
upvoted 3 times
...
BrucePark
1 year, 3 months ago
I think E is correct at least. Because to perform callout @future might be used.
upvoted 1 times
...
DonAldos
1 year, 7 months ago
Selected Answer: ACD
A. The method must use the @AuraEnabled annotation to make it accessible to Lightning web components and Aura components. C. The method must be defined as static since it's called from a Lightning component. D. The method must be defined as public to ensure that it can be accessed by other Apex classes, including the Einstein Next Best Action process builder action. The @InvocableMethod annotation is used for process builder actions that accept parameters. The @Future annotation is used for asynchronous Apex methods.
upvoted 4 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 ...