I have defined a component event like below to carry list of Brokers.

<aura:event type="COMPONENT">
    <aura:attribute name="data" type="Broker__c[]"/>

From the controller method, I am setting the parameter on the event like below:

    "data": component.get('v.selectedBrokers')

The attribute is defined as below:

<aura:attribute name="selectedBrokers" type="Broker__c[]" />

But while trying to access the value in parent component, the value is coming as undefined.

WARNING: Unsupported [object Object] method: Symbol(Symbol.toPrimitive). Returning undefined
[object Object]

My question is whether its possible to pass list of sObjects during event propagation.

  • Broker__c[] is not Account[]. I'd expect things to break.
    – sfdcfox
    Commented Jul 17, 2017 at 16:52
  • Hi. That was typo error. I have edited my question. I am not using Account object, only Broker.
    – nica
    Commented Jul 17, 2017 at 17:07
  • Did you register the event in the component? i see a warning and not an error, would be good to see the complete component/event/controller package to understand how you are passing data to the event attribute
    – Rao
    Commented Jul 17, 2017 at 18:24
  • Please share entire component code so we can see where the problem is Commented Jul 18, 2017 at 4:42

1 Answer 1


To answer your question, Yes, arrays can be passed as event attribute within lightning components framework.

You probably need to look elsewhere for possible cause of error. A good test will be to print the value of list in console logs, before passing them to event.

You must log in to answer this question.

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