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.
A custom Apex Class can be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned.
B.
Lists of Custom Apex Classes cannot be returned by Apex Controllers called by Lightning Aura Components.
C.
Basic data types are supported, but defaults, such as maximum size for a number, are defined by the objects that they map to.
D.
Only Basic data types and sObjects are supported as return types for Apex Controllers called by Lightning Aura Components.
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
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.
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.
beardAnt
1Â month, 1Â week agoAnjindal
5Â months, 2Â weeks agomoitam
1Â year, 2Â months agosanto_aj
1Â year, 6Â months agoIke300
1Â year, 7Â months agoIke300
1Â year, 7Â months agotest_1510_1
2Â years agolevian
2Â years, 1Â month agoChiaSam
2Â years, 4Â months agoChiaSam
2Â years, 4Â months agoLiquad
3Â years, 1Â month ago