Skip to main content
Nintex Community Menu Bar
Question

checkboxes not defaulting to true as per standard field setup

  • July 9, 2024
  • 7 replies
  • 51 views

Forum|alt.badge.img+20

as per title, pic and video
2e8dfecd801142f1e57dccb238698faa527b7c87.png


7 replies

Forum|alt.badge.img+13

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


Forum|alt.badge.img+20

What’s the work around?


Forum|alt.badge.img+20

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&lt;n;i++) { checkboxes[i].checked = true; } }); })(skuid);<br>

Forum|alt.badge.img+2

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. 


Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

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



Forum|alt.badge.img+10
  • July 9, 2024

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!


Forum|alt.badge.img+18

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?