You need to sign in to do that
Don't have an account?
divya1234
how to sort picklist value from custom settings and how to set default value
I stored all my picklis values in custom setting and i am accessing those values in my controller like /**for (ApplicationPicklist__c Application : ApplicationPicklist__c.getAll().values())
options.add(new SelectOption(Application.Application__c ,Application.Name+' - '+Application.Application__c));
return options;**/
do we have option to set any default value in apex code .and cn i sort the values alphabetically
options.add(new SelectOption(Application.Application__c ,Application.Name+' - '+Application.Application__c));
return options;**/
do we have option to set any default value in apex code .and cn i sort the values alphabetically
Greetings to you!
Please try the below code:
Please refer to the below link which might help you further.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_custom_settings.htm
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas