1

Does Salesforce support passing an array or list of big objects as a parameter for an AuraEnabled controller method? In other words can I pass from a lightning component javascript controller an array of big objects directly to AuraEnabled controller method to save into the big object store? Or do I have to pass in JSON as a string an materialize an array or list on the server side?

0

Ofcourse Yes. You are able to send list and additional attributes like this.

var action = component.get('c.filterSave') action.setParams({ "statement":component.get('v.fullList'), "name":component.find('saveFilterName').get('v.value'), "type":component.find('saveFilterType').get('v.value'), "ObjectType":component.find('saveFilterObjectType').get('v.value') });

And You get the List and attributes on AuraEnabled controller like this.

@AuraEnabled public static Filter__c filterSave(List<sObject> statement,String type,String name,String ObjectType){ system.debug(statement); system.debug(name); system.debug(type); return null; }

2
  • Have you tried with a big object? I know you can with an sobject but I get an unreadable error if I use a custom big object. I had to first serialize it as JSON string then pass the string as the argument and finally deserialize it on the server side.
    – ploc
    Nov 28 '17 at 23:25
  • The curious thing is that you can pass a big object (i.e. __b type object) as a parameter but array or list of big objects fail.
    – ploc
    Nov 28 '17 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.