When a model condition for a date field is set to value of field from another model, a SOQL Error is encountered.
An error occurred while attempting to perform the following SOQL query: SELECT Id FROM Contact WHERE (AccountId = '00137000003of14AAA')AND(Birthdate >= 2015-07-30T18:40:06.000+0000) LIMIT 21 Error:value of filter criterion for field 'Birthdate' must be of type date and should not be enclosed in quotes
Steps to reproduce:
- Create standard account detail page
- Add “Contact” model
- Add AccountId condition to contact model from Account model
- Add “Birthdate” condition greater than equal to Account model createdate
- Preview page picking an error
Expected Behavior
Page displays without error
Actual Behavior
Page generates SOQL error above
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">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions/>
</model>
<model id="Contact" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Contact">
<fields/>
<conditions>
<condition type="modelmerge" value="" field="AccountId" operator="=" model="Account" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="noquery"/>
<condition type="modelmerge" value="" field="Birthdate" operator="gte" model="Account" enclosevalueinquotes="false" mergefield="CreatedDate" novaluebehavior="noquery"/>
</conditions>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-3U2WW-67">
<maintitle>
<template>{{Name}}</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="Account" mode="read" uniqueid="sk-3U2WW-68">
<columns>
<column width="50%">
<sections>
<section title="Basics">
<fields>
<field id="Name"/>
</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>