Checkbox UI Only fields with “Default Value” of “checked” are not displaying as “checked” in the UI.
Notes - Inspecting skuid.$M(‘Account’).getFirstRow() shows that there is no field value for the UI field on initial page load.
Steps to reproduce:
- Create account detail page
- Add UI only checkbox field with “default value” checked
- Add field to field editor
- Preview page
Actual Result
UI only field shows “false” (not checked)
skuid.$M(‘Account’).getFirstRow() does not contain a field value for the UI only field
Expected Result
field should display as “true” checked
skuid.$M(‘Account’).getFirstRow() should contain a field value for UI only field with value of true
Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="CheckboxUIField" uionly="true" displaytype="BOOLEAN" label="Checkbox UI Field" defaultValue="true"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-2R5OlO-68">
<maintitle>
<template>{{Name}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="savecancel"/>
</actions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="read" uniqueid="sk-2R5OlO-69" buttonposition="">
<columns>
<column width="100%">
<sections>
<section title="Basics" collapsible="no">
<fields>
<field id="Name"/>
<field id="CheckboxUIField"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>