2

Below Code:

public class parentclass{

    public class Model{
        @AuraEnabled public String year {get;set;}
        @AuraEnabled public Map<Integer, Decimal> dataMap {get;set;}
    }
}

Component Code:

<aura:component controller="parentclass" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global">
    <aura:attribute name="listVehicles" type="parentclass.Model[]" />

** Erorr while saving the component:

Failed to save undefined: Invalid type: Modelenter image description here[]`**

This is speacially on the API 42 version, I have old component which is on 40 API version works absolutely fine. Is this is a bug or not the right way to use wrapper any more in lightning ?

Any ideas appreciated !

Thanks

0

1 Answer 1

3

We are not supposed to use it as per this link from salesforce. This was never intended to work in the first place. This was enforced from Api version 42.

Use a separate outer class for the inner wrapper class.

2
  • Can you post this as separate question since this is not related to the original question.
    – RedDevil
    Commented Feb 28, 2018 at 13:58
  • sure, I will mark your as best answer, I will put that in separate questions
    – Quddus
    Commented Feb 28, 2018 at 14:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .