Since SF update to Summer 18, we are facing this issue where an Inner Class could not be set as an Aura Attribute type.
Lightning Component
<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" access="global"
controller="RegistrationController">
<aura:attribute name="rescheduleWrap" type="RegistrationController.RescheduleWrapper"/>
<aura:attribute name="recordId" type="Id"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
Apex Controller
public without sharing class RegistrationController{
public class RescheduleWrapper{
@AuraEnabled
public List<Event__c> eventList;
@AuraEnabled
public boolean penalty;
public RescheduleWrapper(){
this.eventList = new List<Event__c>();
this.penalty = false;
}
}
}
Lightning Component Error
Failed to save Reschedule_Registration.cmp: Invalid <aura:attribute> type: RescheduleWrapper: Source
Please refer to this link which has the same issue. https://success.salesforce.com/issues_view?id=a1p3A0000001CBeQAM
But in our Org. we have not set any Namespace still we are facing this issue. Anyways the workaround mentioned in the above link does work for us (in which we have to create an Interface at the Top level and then make the inner Classes implement them).
Please suggest if there is any other workaround? Is this happening since Summer 18? Can we resolve it by deactivating any critical update.