I am trying to set a condition on Child Relationships field in a model. When I set the condition using a specific value it works. When I tried to use it using the option for values from source model it does not work. Source model and the relevant field does have the records and values and I have verified that by displaying the same in a field editor. I am trying to use the source model based condition so that I can modify a condition on the source model itself to achieve a filter on child relationship records. Is this a known issue?
Adding relevant sections from the XML file below. SelectedMonth model does return rows and can be displayed in UI but somehow the condition on child relationship field does not seem to get the rows from the model and hence the query gets deactivated or aborted depending on the option set. I have set the model action on SelectedMonth model to requery the target model so that child relationship records get filtered based on the condition (records in the source model). But for some reason source model does not seem to return records to the child relationship condition.
<model id="SelectedMonth" limit="1" query="true" createrowifnonefound="true" sobject="Calendat_Month__c" orderby="Order__c DESC"> <fields> <field id="Order__c"/> <field id="Name"/> </fields> <conditions> <condition type="fieldvalue" value="" enclosevalueinquotes="false" field="Order__c" state="filterableoff" inactive="true" operator="=" name="Order__c"/> </conditions> <actions> <action> <actions> <action type="requeryModel" model="PS_DealList"> <onerroractions> <action type="unblockUI" message="There was an error" timeout="3000"/> </onerroractions> </action> </actions> <events> <event>models.loaded</event> </events> </action> </actions> </model>