function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suraj GharatSuraj Gharat 

Sever side action response undefined

Hello Everyone,

Can anybody tell me how to access/process the content returned by "response.getReturnValue()" in action callback. In my case if the returned response is of type String or any specific sobject it works correctly; However for user defined types, it returns a JS object instance with no values in it. I checked my Apex part and it's returning the right expecting data.

Your help is greatly appreciated.
 
bob_buzzardbob_buzzard
Have you set all of your properties to be available to Lightning via the @AuraEnabled attribute?  E.g. here's a snippet from one of my user defined types I use in a lightning component:
 
public class DateInfo
    {
    	@AuraEnabled
        public Date minDate;
    }