0

I am attempting to put a custom lightning component into a flow, and I need a record collection variable. The problem is that I don't know what object the record collection variable is, and flows don't support the "Object[]" type. What can I do to make it dynamic, or is there no way?

  • 2
    Have you tried just declaring the type as List? – Adrian Larson Jul 29 at 13:49
  • 1
    Or as a list of SObject? – Phil W Jul 29 at 14:18
  • Apart from what Adrian and Phile have mentioned, there is a quite nice documentation explaining How Variable Types Operate in the Lightning Component Framework – Raul Jul 29 at 16:09
  • Using type List is not supported in Flows, otherwise I would try that. Does using type sObject[] allow me to use a record collection variable? – Gavin Morton Jul 30 at 14:05
0

Lightning aura component attribute of data type Object has some bug - properties of Object does not update in some cases. Instead other types like sObject or Account or MyObject__c works fine.

Other completely generic data types which work fine are List and Map.

  1. List is array of any data type.
  2. Map is Key-value pairs of any data-types. It is better if key is of type String.

You can define the type as List and try.

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.