When my custom component is dropped into a page in Lightning App Builder, I'm using the .design file in the lightning component to expose global attributes that affect the app layout and feature enablement. The admin makes those selections and saves the page with those global values.

When the page loads for a user, it picks up the values for the global attributes from the previously saved page.

Are those values accessible to set? Here's why I'm asking...

I'd like to use the color picker to set a global attribute. The design:attributes only support checkbox and picklist, not color picker, or date picker, or lots of other handy components.

I noticed that in Lightning App Builder, my component is "live" -- when I make a setting change on the right side, the component immediately reloads with that new setting. So I added a "Show Configuration Wizard" checkbox, which launches a modal in my component. That modal can contain a color picker or date picker, or dependent picklists, or whatever. But after picking the value, I need a way to set that value for the page in Lightning App Builder -- not just in the currently running instance of my component.

Can I do that in Apex?

1 Answer 1


Well, I havent tried this yet, but let me share my idea.

From the AppBuilder preview, you have to click the custom deploy button, the button will in turn call Apex.

Once you are in Apex with your attribute, we can leverage use of Metadata Apex wrapper which we can use to deploy FlexiPages.

So theoretically it looks possible.

  • 1
    Thanks for the lead, I'll hack around with that info. If that's possible, then we could create configuration wizards or even Flows. Commented Jan 17, 2019 at 20:06
  • Sure, Let us know how it goes. Commented Jan 17, 2019 at 20:07
  • I looked at those pages you referenced... I'm clearly in over my head! 😫 At least I have some classes and methods to start poking at. What I'm hoping to do is dynamically change the values displayed in the configuration settings on the right side, by changing the values in the modal popup from the component. That seems a bit more complicated than searching out an existing page and editing the settings. Commented Jan 17, 2019 at 21:08

You must log in to answer this question.

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