How to populate ui only picklist field through apex code.

Rahul,

You may not need to use Apex.  If the data that drives the pick list is in an object, you can drive the pick list options using a model in Skuid.  Here is a posting where I provided a sample page that shows you how to do this:

https://community.skuid.com/t/how-to-bind-skuid-picklist-ui-field-from-snippet

If you still want to go down the path of using an Apex class, then you can Salesforce’s JS library to call an Apex Class directly.  The function call is ‘sforce.apex.execute’.  Here is a nice write up from Zach on what you need to do:

https://community.skuid.com/t/calling-apex-function

Here is an example of a snippet to build and render a custom pick list values on a UI only field:

https://community.skuid.com/t/ui-only-picklist-custom-field-renderer-snippet-stopped-work…


I would recommend that you consider how you can setup an object to act as a source for your pick list options.  This will keep your page declarative and greatly reduce what you have to maintain going forward.

Thanks,

Bill