Salesforce Certified Platform Developer II — Question 160

Which two scenarios require an Apex method to be called imperatively from a Lightning web component? (Choose two.)

Answer options

Correct answer: B, C

Explanation

The correct answers, B and C, indicate scenarios where imperative calls to Apex are necessary. Option B is correct because methods without the cacheable=true annotation cannot be called declaratively. Option C is also correct as button clicks require imperative calls to execute Apex methods, while the other options do not necessarily indicate the need for imperative invocation.