When saving a record that contains a model override of a DATETIME field to DATE, an “List index out of bounds” error is encountered.
Steps to reproduce:
- Create page using XML below
- Preview page
- Set the Reminder date field
- Click save
Expected Behavior
Record saves successfully
Actual Behavior
“List index out of bounds: 1” error is encountered
Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Task"> <models>
<model id="Task" limit="1" query="false" createrowifnonefound="true" sobject="Task" adapter="" type="">
<fields>
<field id="Subject"/>
<field id="CreatedDate"/>
<field id="ReminderDateTime" overridemetadata="true" ogdisplaytype="DATETIME" displaytype="DATE"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<pagetitle model="Task" uniqueid="sk-2MTabF-70">
<maintitle>
<template>{{Subject}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="delete"/>
<action type="clone"/>
<action type="share"/>
<action type="savecancel" window="self"/>
</actions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Task" mode="edit" uniqueid="sk-2MTabF-71" buttonposition="">
<columns>
<column width="50%">
<sections>
<section title="Basics" collapsible="no">
<fields>
<field id="Subject"/>
<field id="ReminderDateTime" valuehalign="" type="" minuteincrement="5"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="System Info">
<fields>
<field id="CreatedDate"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>