as per title, pic and video
This is actually due to a Salesforce bug, which has been around for years and is still not fixed.
Please, please, please go to both of the following links and vote for this issue to be fixed!
Idea: Fix field describe getDefaultValue() for checkboxes and picklists
Known issue: DescribeFieldResult.getDefaultValue() returns null for Checkbox field and Picklist field
What’s the work around?
Woot! Woot!
10 minutes of google searching and I put this together.
(function(skuid){ var $ = skuid.$; $(function(){ var checkboxes = $("#reportoptions :input[type=checkbox]"); for(var i=0, n=checkboxes.length;i<n;i++) { checkboxes[i].checked = true; } }); })(skuid);<br>
Hello Pat, I tried to implement this, but it is not working. Could you provide some instructions on how you got it to work. Do we need to set a class or ID.
Following up here. In Spring 16 - Salesforce has indicated that this issue has been fixed. This should no longer be a problem!
Having said that, Pat’s work around is still super cool!
https://success.salesforce.com/issues_view?id=a1p300000008XL8AAM
I know Salesforce said the issue is fixed and I hope it is. I have noticed though that I have a checkbox where the default value is:
“Default Value Checked”
But when I create a new record, and I am using skuid to skin the new record page, that field shows up and is not checked. Is there anything we need to do special to get it to recognize the default value on new record creation?
Thank you!
When the record is saved, it will get the default value from the SFDC settings, but I think Skuid should show the default value on new records that haven’t been saved, too. What say you, Skuid?
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.