Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow
Name
Amount
Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)
A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.
B. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.
C. Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.
D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page. D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
Explanation:
Since Universal Containers transitioned to Lightning Experience, the best approach is to use user-initiated actions that allow direct execution of the HTTP REST callout when the user interacts with the Opportunity record.
Why are A and D correct?
A. Lightning Component + Lightning Action:
Lightning Actions can be used to trigger custom logic via a Lightning Component, allowing users to initiate the REST callout directly from the Opportunity detail page.
This provides a modern, flexible solution that fits well with Lightning Experience.
D. Visualforce Page + Quick Action:
Visualforce pages can execute HTTP REST callouts and can be exposed as Quick Actions, allowing the user to trigger the request manually.
This solution is useful for organizations transitioning from Classic to Lightning while still leveraging existing Visualforce-based logic.