I've got a custom built LWC to be used within a screen component in a flow. My component basically renders a collection of SObjects in a distinct way. It can also deal with different types of sObjects.
The only thing I cannot get working is my design time configuration file. I want to register the property to allow the user to bind any kind of sObject collection (Account, Contact, Custom Object, etc.) to that property in the Flow Builder.
This is my configuration:
<targetConfigs>
<targetConfig targets="lightning__FlowScreen">
<property name="records" label="Record collection" type="@salesforce/schema/Account[]" role="inputOnly"/>
</targetConfig>
</targetConfigs>
This works - but limits the user to provide an Account collection.
I've tried all of the following - without success:
type="@salesforce/schema/SObject[]"
Result: Invalid reference SObject of type sobjectClass in file recordPicklist.js-meta.xml
type="@salesforce/schema/Object[]"
Result: Invalid reference Object of type sobjectClass in file recordPicklist.js-meta.xml
type="Object[]"
Result: Type 'Object[]' is either not supported by 'lightning__FlowScreen' or does not exist.
Can anybody tell me how to achieve this?
Thanks!