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
Basant Kr VermaBasant Kr Verma 

how to pass a complete object or wrapper class as parameter in lightning component after enabling locker service?

Hi Hive,

I am using custom lightning components in my napili community, we use to call @AuraEnabled methods on save which will perform desired operation.
In this calling we were able to pass a variable of standard/custom object types or wrapper class type

But after enabling "Locker Service" criticle update we are not able to pass object type variable as parameter, we are not even abale to send it after converting into JSON.

The only workaround which worked for me is passing each and every fields as parameters and assemble them again in apex method.
But this is also having issue if we have lots of fields on UI to send in Save method because we can't pass more then 32 parameters.

Any suggestion or workaround ?