3

I am trying to create a lightning component but I don't know how I can pass dynamic data source in lightning component design file.

This is the standard example from the documentation where we can pass comma separated String

<design:component label="Organization Object">
     <design:attribute name="filter" label="Custom Filter" 
     description="Please Select a object" 
     datasource="Account,Contact,Lead"/>
</design:component>

is there any way so that I can pass dynamic list of items such as object list, Opportunity stages?

3

This is not currently possible. The datasource attribute of the design file only supports a static list of values.

Providing dynamic picklist support is on our roadmap, but there is no timeline to share at this point [#safeharbor].

  • Thanks Eric for your response. I will wait for this feature – Himanshu Oct 7 '15 at 14:10
0

As of Spring '17, you can now build dynamic picklists for lightning page components in Apex.

While they are "dynamic", these design attributes cannot respond to user selections in other design attributes (Vote for the idea). You might be able to use custom metadata or custom settings to mimic a dependency between items.

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.