Another custom component question.
I have a model property on a custom component.
I’d like to create a picklist property where the picklistEntries are defined by the metadata for a picklist field in the specified model.
Even better, I could dynamically create a model on the desired sObject and get the picklistEntries from a field that way.
I’ve tried both, without success.
It seems like skuid.$M() returns undefined even when the model ‘exists’… I suspect that a model has to be loaded for that to work? What if I create a model new model with skuid.model.Model() in the builders.js and call .initialize().load()?
Here’s my real question: Is there a way to access field metatdata on the builder-side in order to dynamically define picklist entries for a component property?
It Works!
I created a model with new skuid.model.Model(), and then used .initialize().register().load().
Not sure if I need all three of those… but it’s working.
If there’s a better way to accomplish this, I’d love to know.
Thanks!
Creating a fake Model would work. Right now the Skuid Composer doesn’t always load picklist entries for all fields — to conserve memory, since this can be a TON of Picklist Entries for some folks’ Picklist fields — so there’s not a function I can point you to, unfortunately.
Zack, et al.,
What does the getMetadataForField() function do in skuid.builder.core?
Would that address the need to access a field’s picklist entries on the builder side?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.