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
lavanya mulpurilavanya mulpuri 

Invalid <aura:attribute> type: Wrapperobj[]

Hi All,

I'm unable to save my Lightning Component, becase it keeps throwing this error Invalid <aura:attribute> type: Wrapperobj[]

Attribute declaration: 
 <aura:attribute name="contactList" type="SearchLeads.Wrapperobj[]" />
Class name : SearchLeads
Wrapper class name : Wrapperobj

I'm facing this issue, after my org got updated to SPRING 18

Thanks in advance!
Lavanya

Best Answer chosen by lavanya mulpuri
lavanya mulpurilavanya mulpuri
Use String[] as type

All Answers

GauravGargGauravGarg
Iavanya,

Please change it to WrapperClass[]lightning do not refer Class custom wrapper classes. 

Hope this will solve your problem.

Thanks,
Gaurav
Skype: gaurav62990
Takes Freelance Task
sfdcMonkey.comsfdcMonkey.com
hi lavanya,
   if your org have custom namespace then you got this error, this is a known issue :
https://success.salesforce.com/issues_view?id=a1p3A0000001CBeQAM

the workaround is cut your wrapper(child) class from main class and create new fresh wrapper class and then use direct wrapper class name

<aura:attribute name="tlist" type="childClass1[]"/>

i hope it helps you.
      Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
    thanks
sfdcmonkey.com
 
lavanya mulpurilavanya mulpuri
Use String[] as type
This was selected as the best answer
Saket Ranjan 3Saket Ranjan 3
@Lavanya
you might have kept it inside <form> your code </form> because of which this error might be occurring .