Model query bug in child relationship names

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
I made this video before I found the bug.


I subsequently was reviewing the model for issues since my rip and replace procedure. There was nothing wrong from that perspective. I found an issue in condition of the child relationship. It was referencing a model whose name had been changed.

I actually don't need the child related fields in my model so I removed them and it started to work. I would've thought an error would be displayed.

<field id="Quote_Task_Labour__r" type="childRelationship" limit="10">
               <fields>
                  <field id="Quote_Labour_Rate__c"/>
                  <field id="Quote_Labour_Rate__r.Labour_Rate__c"/>
                  <field id="Quote_Labour_Rate__r.Labour_Rate__r.Rate__c"/>
                  <field id="Quote_Labour_Rate__r.Labour_Rate__r.Name"/>
                  <field id="Labour__c"/>
               </fields>
               <conditions>
                  <condition operator="=" type="modelmerge" field="Quote_Labour_Rate__r.Quote__c" value="" model="CurrentQuote" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="noquery"/>
               </conditions>
            </field>
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
So the bug seems to be that Model Names are not being kept in synch when they are used in a "field from another model" condition in child records fields. 

I'll pass it along. 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pat.  This has been fixed and will be included in our upcoming release.