A developer wants to call an Apex Server-side Controller from a Lightning Aura Component.
What are two limitations to the data being returned by the Controller? (Choose two.)
A developer wants to call an Apex Server-side Controller from a Lightning Aura Component.
What are two limitations to the data being returned by the Controller? (Choose two.)
A custom Apex Class can be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned. Additionally, only basic data types and sObjects are supported as return types for Apex Controllers called by Lightning Aura Components. Lists of custom Apex classes can also be returned under these conditions, making options A and D correct.
C and A for me is correct,
as sObject is also supported
Return data types can be any of the following. Simple—String, Integer, and so on. See Basic Types for details. sObject—standard and custom sObjects are both supported. See Standard and Custom Object Types. Apex—an instance of an Apex class. (Most often a custom class.) See Custom Apex Class Types. You can’t use an Apex inner class as a return value for an Apex method that's called by an Aura component. Collection—a collection of any of the other types. See Collection Types.
D is not correct since it mentioned ONLY 2
According to the documentation: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_returning_data.htm Results data from an Apex server-side controller must be serializable into JSON format. This means that only basic data types and sObjects are supported as return types for Apex controllers called by Lightning Aura Components. Lists of custom Apex classes can also be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned. In this case, the correct answers are A and D
Correct Ans A & D
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_returning_data.htm
Answer should be A and D as sObject is also supported.
@AuraEnabled is required for wrapper class properties
A&C it's ok https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_returning_data.htm