Popup w/ Page include is making my UI Model vanish

  • 1
  • Problem
  • Updated 11 months ago
  • Solved
  • (Edited)
Not entirely sure what's going on here, but I am getting the follow error when I click on a button that launches a popup, close that pop up and click on the "+" to add an event to the calendar

"1. Invalid Model 'UIModel' on Field Editor component. This Model's Id may have been changed, or the Model may have been deleted. "

Video demo b/c i'm clueless here. 
Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb

Posted 11 months ago

  • 1
Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb
Help, please? :)
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Josef,

Would you post the XML for your models on this page.

Thanks,

Bill
Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb
<models>
        <model id="Table_Events" limit="350" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Event" orderby="StartDateTime DESC">
            <fields>
                <field id="Subject" overridemetadata="true" ogdisplaytype="COMBOBOX" displaytype="TEXTAREA" picklistsource="manual"/>
                <field id="StartDateTime" overridemetadata="true" ogdisplaytype="DATETIME" displaytype="DATE"/>
                <field id="EndDateTime" overridemetadata="false" ogdisplaytype="DATETIME" displaytype="DATETIME" defaultvaluetype="modelmerge" defaultValue="" model="Table_Events" enclosevalueinquotes="false" mergefield="StartDateTime"/>
                <field id="ActivityDateTime"/>
                <field id="WhatId" overridemetadata="true" ogdisplaytype="REFERENCE" displaytype="REFERENCE" datasource="salesforce" defaultvaluetype="fieldvalue" targetobjects="Opportunity">
                    <batchfields/>
                </field>
                <field id="What.Name"/>
                <field id="Medium__c"/>
                <field id="Financials__c"/>
                <field id="HCM__c"/>
                <field id="Technology__c"/>
                <field id="Category__c"/>
                <field id="Type__c"/>
                <field id="Sub_Type__c"/>
                <field id="Travel_Duration__c" overridemetadata="true" ogdisplaytype="DOUBLE" displaytype="PICKLIST" precision="" scale="" picklistsource="manual">
                    <picklistentries>
                        <entry value="1" label="1"/>
                        <entry value="1.5" label="1.5"/>
                        <entry value="2" label="2"/>
                        <entry value="2.5" label="2.5"/>
                        <entry value="3" label="3"/>
                        <entry value="3.5" label="3.5"/>
                        <entry value="4" label="4"/>
                        <entry value="4.5" label="4.5"/>
                        <entry value="5" label="5"/>
                        <entry value="5.5" label="5.5"/>
                        <entry value="6" label="6"/>
                        <entry value="6.5" label="6.5"/>
                        <entry value="7" label="7"/>
                        <entry value="7.5" label="7.5"/>
                        <entry value="8" label="8"/>
                        <entry value="8.5" label="8.5"/>
                        <entry value="9" label="9"/>
                        <entry value="9.5" label="9.5"/>
                        <entry value="10" label="10"/>
                        <entry value="10.5" label="10.5"/>
                        <entry value="11" label="11"/>
                        <entry value="11.5" label="11.5"/>
                        <entry value="12" label="12"/>
                    </picklistentries>
                </field>
                <field id="Includes_Travel__c"/>
                <field id="Meeting_Duration__c" overridemetadata="true" ogdisplaytype="DOUBLE" displaytype="PICKLIST" precision="" scale="" picklistsource="manual">
                    <picklistentries>
                        <entry value="1" label="1"/>
                        <entry value="1.5" label="1.5"/>
                        <entry value="2" label="2"/>
                        <entry value="2.5" label="2.5"/>
                        <entry value="3" label="3"/>
                        <entry value="3.5" label="3.5"/>
                        <entry value="4" label="4"/>
                        <entry value="4.5" label="4.5"/>
                        <entry value="5" label="5"/>
                        <entry value="5.5" label="5.5"/>
                        <entry value="6" label="6"/>
                        <entry value="6.5" label="6.5"/>
                        <entry value="7" label="7"/>
                        <entry value="7.5" label="7.5"/>
                        <entry value="8" label="8"/>
                        <entry value="8.5" label="8.5"/>
                        <entry value="9" label="9"/>
                        <entry value="9.5" label="9.5"/>
                        <entry value="10" label="10"/>
                        <entry value="10.5" label="10.5"/>
                        <entry value="11" label="11"/>
                        <entry value="11.5" label="11.5"/>
                        <entry value="12" label="12"/>
                    </picklistentries>
                </field>
                <field id="WhoId" overridemetadata="true" ogdisplaytype="REFERENCE" displaytype="REFERENCE" datasource="salesforce" targetobjects="Contact" rel="Contact" keyfield="WhoId">
                    <batchfields>
                        <batchfield field="AccountId" fieldtargetobjects="Account"/>
                    </batchfields>
                </field>
                <field id="Who.Name"/>
                <field id="ColorCode" uionly="true" displaytype="FORMULA" label="ColorCode" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
                    <formula>IF({{Category__c}}=="Presales Opportunity Support","#c1dbed",
IF({{Category__c}}=="Marketing Support","#b4dfdb",
IF({{Category__c}}=="Training &amp; Development (Not Customer Facing)","#fdb2ba",
IF({{Category__c}}=="Customer Care Support (No Current Opportunity)","#d9dbff",
IF({{Category__c}}=="Master Tenant Maintenance","#ffda94",
"#FFFFFF")))))

                       </formula>
                </field>
                <field id="Contact" uionly="true" displaytype="TEXT" label="Contact"/>
                <field id="Id"/>
                <field id="Meeting_Date__c"/>
                <field id="Type"/>
                <field id="CreatedById"/>
                <field id="CreatedBy.Name"/>
                <field id="Start_Date__c"/>
                <field id="EventType" uionly="true" displaytype="FORMULA" label="EventType" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
                    <formula>IF({{Category__c}}=="Presales Opportunity Support", "Presales Opportunity Support",
IF({{Category__c}}=="Marketing Support", "Marketing Support",
IF({{Category__c}}=="Customer Care Support (No Current Opportunity)", "Customer Care Support",
IF({{Category__c}}=="Master Tenant Maintenance", "Master Tenant Maintenance",
IF({{Category__c}}=="Training &amp; Development (Not Customer Facing)", "Training &amp; Development",
"New Event")))))</formula>
                </field>
            </fields>
            <conditions logic="(1 OR 6) AND 2 AND 3 AND 4 AND 5 AND 7">
                <condition type="userinfo" value="" field="CreatedById" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
                <condition type="fieldvalue" field="StartDateTime" operator="gte" inactive="true" enclosevalueinquotes="false" name="__autofilter__start__StartDateTime" state="filterableoff" value=""/>
                <condition type="fieldvalue" field="StartDateTime" operator="lte" inactive="true" enclosevalueinquotes="false" name="__autofilter__end__StartDateTime" state="filterableoff" value=""/>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Category__c" state="filterableoff" inactive="true" name="Category__c"/>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Type__c" state="filterableoff" inactive="true" name="Type__c"/>
                <condition type="userinfo" value="" field="CreatedBy.ManagerId" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="CreatedById" fieldtargetobjects="User" state="filterableoff" inactive="true" name="CreatedById"/>
            </conditions>
            <actions>
                <action>
                    <actions>
                        <action type="updateRow" fieldmodel="Table_Events" affectedrows="context" value="{{StartDateTime}}" field="EndDateTime" enclosevalueinquotes="false"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>StartDateTime</field>
                    </fields>
                </action>
            </actions>
        </model>
        <model id="UIModel" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true" unloadwarningifunsavedchanges="false">
            <fields>
                <field id="Training" displaytype="BOOLEAN" ogdisplaytype="TEXT" label="Training" defaultvaluetype="fieldvalue" defaultValue="false"/>
                <field id="CustomerFacing" displaytype="BOOLEAN" label="Customer Facing" ogdisplaytype="TEXT" defaultvaluetype="fieldvalue" defaultValue="false"/>
                <field id="Account" uionly="true" displaytype="REFERENCE" label="Account" ogdisplaytype="TEXT" datasource="salesforce" precision="9" scale="2" targetobjects="Account">
                    <batchfields/>
                </field>
                <field id="Opportunity" uionly="true" displaytype="REFERENCE" label="Opportunity" ogdisplaytype="TEXT" datasource="salesforce" targetobjects="Opportunity">
                    <batchfields/>
                </field>
                <field id="Campaign" uionly="true" displaytype="REFERENCE" label="Campaign" ogdisplaytype="TEXT" datasource="salesforce" targetobjects="Campaign">
                    <batchfields/>
                </field>
                <field id="Relatedto" displaytype="PICKLIST" label="Related to:" ogdisplaytype="TEXT" picklistsource="manual" defaultvaluetype="fieldvalue" defaultValue="Opportunity">
                    <picklistentries>
                        <entry value="Opportunity" label="Opportunity"/>
                        <entry value="Account" label="Account"/>
                        <entry value="Campaign" label="Campaign"/>
                    </picklistentries>
                </field>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Team" limit="50" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="User">
            <fields>
                <field id="Name"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="Id" operator="in" model="Table_Events" enclosevalueinquotes="true" mergefield="CreatedById" novaluebehavior="deactivate" fieldtargetobjects="User"/>
                <condition type="userinfo" value="" field="ManagerId" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            </conditions>
            <actions/>
        </model>
        <model id="Calendar_Events" limit="350" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Event" orderby="StartDateTime DESC">
            <fields>
                <field id="Subject" overridemetadata="true" ogdisplaytype="COMBOBOX" displaytype="TEXTAREA" picklistsource="manual"/>
                <field id="StartDateTime"/>
                <field id="EndDateTime" overridemetadata="false" ogdisplaytype="DATETIME" displaytype="DATETIME"/>
                <field id="ActivityDateTime"/>
                <field id="WhatId" overridemetadata="true" ogdisplaytype="REFERENCE" displaytype="REFERENCE" datasource="salesforce" defaultvaluetype="fieldvalue" targetobjects="Opportunity">
                    <batchfields/>
                </field>
                <field id="What.Name"/>
                <field id="Medium__c"/>
                <field id="Financials__c"/>
                <field id="HCM__c"/>
                <field id="Technology__c"/>
                <field id="Category__c"/>
                <field id="Type__c"/>
                <field id="Sub_Type__c"/>
                <field id="Travel_Duration__c" overridemetadata="true" ogdisplaytype="DOUBLE" displaytype="PICKLIST" precision="" scale="" picklistsource="manual">
                    <picklistentries>
                        <entry value="1.0" label="1.0"/>
                        <entry value="1.5" label="1.5"/>
                        <entry value="2.0" label="2.0"/>
                        <entry value="2.5" label="2.5"/>
                        <entry value="3.0" label="3.0"/>
                        <entry value="3.5" label="3.5"/>
                        <entry value="4.0" label="4.0"/>
                        <entry value="4.5" label="4.5"/>
                        <entry value="5.0" label="5.0"/>
                        <entry value="5.5" label="5.5"/>
                        <entry value="6.0" label="6.0"/>
                        <entry value="6.5" label="6.5"/>
                        <entry value="7.0" label="7.0"/>
                        <entry value="7.5" label="7.5"/>
                        <entry value="8.0" label="8.0"/>
                        <entry value="8.5" label="8.5"/>
                        <entry value="9.0" label="9.0"/>
                        <entry value="9.5" label="9.5"/>
                        <entry value="10.0" label="10.0"/>
                        <entry value="10.5" label="10.5"/>
                        <entry value="11.0" label="11.0"/>
                        <entry value="11.5" label="11.5"/>
                        <entry value="12.0" label="12.0"/>
                    </picklistentries>
                </field>
                <field id="Includes_Travel__c"/>
                <field id="Meeting_Duration__c" overridemetadata="true" ogdisplaytype="DOUBLE" displaytype="PICKLIST" precision="" scale="" picklistsource="manual">
                    <picklistentries>
                        <entry value="1.0" label="1.0"/>
                        <entry value="1.5" label="1.5"/>
                        <entry value="2.0" label="2.0"/>
                        <entry value="2.5" label="2.5"/>
                        <entry value="3.0" label="3.0"/>
                        <entry value="3.5" label="3.5"/>
                        <entry value="4.0" label="4.0"/>
                        <entry value="4.5" label="4.5"/>
                        <entry value="5.0" label="5.0"/>
                        <entry value="5.5" label="5.5"/>
                        <entry value="6.0" label="6.0"/>
                        <entry value="6.5" label="6.5"/>
                        <entry value="7.0" label="7.0"/>
                        <entry value="7.5" label="7.5"/>
                        <entry value="8.0" label="8.0"/>
                        <entry value="8.5" label="8.5"/>
                        <entry value="9.0" label="9.0"/>
                        <entry value="9.5" label="9.5"/>
                        <entry value="10.0" label="10.0"/>
                        <entry value="10.5" label="10.5"/>
                        <entry value="11.0" label="11.0"/>
                        <entry value="11.5" label="11.5"/>
                        <entry value="12.0" label="12.0"/>
                    </picklistentries>
                </field>
                <field id="MeetingDate" uionly="true" displaytype="FORMULA" ogdisplaytype="TEXT" label="Meeting Date" readonly="true" returntype="DATE">
                    <formula>{{StartDateTime}}</formula>
                </field>
                <field id="WhoId" overridemetadata="true" ogdisplaytype="REFERENCE" displaytype="REFERENCE" datasource="salesforce" targetobjects="Contact" rel="Contact" keyfield="WhoId">
                    <batchfields>
                        <batchfield field="AccountId" fieldtargetobjects="Account"/>
                    </batchfields>
                </field>
                <field id="Who.Name"/>
                <field id="ColorCode" uionly="true" displaytype="FORMULA" label="ColorCode" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
                    <formula>IF({{Category__c}}=="Presales Opportunity Support","#c1dbed",
IF({{Category__c}}=="Marketing Support","#b4dfdb",
IF({{Category__c}}=="Training &amp; Development (Not Customer Facing)","#fdb2ba",
IF({{Category__c}}=="Customer Care Support (No Current Opportunity)","#d9dbff",
IF({{Category__c}}=="Master Tenant Maintenance","#ffda94",
"#e9e9e9")))))

                       </formula>
                </field>
                <field id="Contact" uionly="true" displaytype="TEXT" label="Contact"/>
                <field id="Id"/>
                <field id="Account" uionly="true" displaytype="REFERENCE" label="Account" ogdisplaytype="TEXT" datasource="salesforce" precision="9" scale="2" targetobjects="Account">
                    <batchfields/>
                </field>
                <field id="Opportunity" uionly="true" displaytype="REFERENCE" label="Opportunity" ogdisplaytype="TEXT" datasource="salesforce" targetobjects="Opportunity">
                    <batchfields/>
                </field>
                <field id="Campaign" uionly="true" displaytype="REFERENCE" label="Campaign" ogdisplaytype="TEXT" datasource="salesforce" targetobjects="Campaign">
                    <batchfields/>
                </field>
                <field id="Related to" uionly="true" displaytype="PICKLIST" label="Related to:" ogdisplaytype="TEXT" picklistsource="manual" defaultvaluetype="fieldvalue" defaultValue="Opportunity">
                    <picklistentries>
                        <entry value="Opportunity" label="Opportunity"/>
                        <entry value="Account" label="Account"/>
                        <entry value="Campaign" label="Campaign"/>
                    </picklistentries>
                </field>
                <field id="EventType" uionly="true" displaytype="FORMULA" label="Event Type" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
                    <formula>IF({{Type__c}}=="Training", "Training Event",
IF({{Type__c}}!="Training" &amp; ISBLANK({{Type__c}}), "New Event",
"Customer Facing Event"))</formula>
                </field>
            </fields>
            <conditions logic="">
                <condition type="userinfo" value="" field="CreatedById" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
                <condition type="userinfo" value="" field="OwnerId" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            </conditions>
            <actions/>
        </model>
        <model id="Copy_Event" limit="1" query="true" createrowifnonefound="true" datasource="salesforce" type="" sobject="Event" orderby="">
            <fields>
                <field id="Subject" overridemetadata="true" ogdisplaytype="COMBOBOX" displaytype="TEXTAREA" picklistsource="manual"/>
                <field id="StartDateTime"/>
                <field id="EndDateTime"/>
                <field id="ActivityDateTime"/>
                <field id="WhatId" overridemetadata="true" ogdisplaytype="REFERENCE" displaytype="REFERENCE" datasource="salesforce" defaultvaluetype="fieldvalue" targetobjects="Opportunity">
                    <batchfields/>
                </field>
                <field id="What.Name"/>
                <field id="Medium__c"/>
                <field id="Financials__c"/>
                <field id="HCM__c"/>
                <field id="Technology__c"/>
                <field id="Category__c"/>
                <field id="Type__c"/>
                <field id="Sub_Type__c"/>
                <field id="Travel_Duration__c"/>
                <field id="Includes_Travel__c"/>
                <field id="Meeting_Duration__c"/>
                <field id="MeetingDate" uionly="true" displaytype="FORMULA" ogdisplaytype="TEXT" label="Meeting Date" readonly="true" returntype="DATE">
                    <formula>{{StartDateTime}}</formula>
                </field>
                <field id="WhoId" overridemetadata="true" ogdisplaytype="REFERENCE" displaytype="REFERENCE" datasource="salesforce" targetobjects="Contact" rel="Contact" keyfield="WhoId">
                    <batchfields>
                        <batchfield field="AccountId" fieldtargetobjects="Account"/>
                    </batchfields>
                </field>
                <field id="Who.Name"/>
                <field id="ColorCode" uionly="true" displaytype="FORMULA" label="ColorCode" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
                    <formula>IF({{Category__c}}=="Presales Opportunity Support","#c1dbed",
IF({{Category__c}}=="Marketing Support","#b4dfdb",
IF({{Category__c}}=="Training &amp; Development (Not Customer Facing)","#fdb2ba",
IF({{Category__c}}=="Customer Care Support (No Current Opportunity)","#d9dbff",
IF({{Category__c}}=="Master Tenant Maintenance","#ffda94",
"#FFFFFF")))))

                       </formula>
                </field>
                <field id="Contact" uionly="true" displaytype="TEXT" label="Contact"/>
                <field id="Id"/>
            </fields>
            <conditions logic="">
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
            </conditions>
            <actions/>
        </model>
        <model id="Table_Events1" limit="" query="true" createrowifnonefound="false" datasource="salesforce" type="aggregate" sobject="Event" orderby="">
            <fields>
                <field id="Id" name="countId" function="COUNT"/>
                <field id="Meeting_Duration__c" name="sumMeetingDurationc" function="SUM"/>
                <field id="Travel_Duration__c" name="sumTravelDurationc" function="SUM"/>
            </fields>
            <conditions logic="1 OR 2">
                <condition type="userinfo" value="" field="CreatedById" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
                <condition type="userinfo" value="" field="CreatedBy.ManagerId" fieldtargetobjects="User" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            </conditions>
            <actions>
                <action>
                    <actions>
                        <action type="updateRow" fieldmodel="Table_Events" affectedrows="context" value="{{$Model.Table_Events.data.0.StartDateTime}}" field="EndDateTime" enclosevalueinquotes="false"/>
                    </actions>
                    <events/>
                </action>
            </actions>
            <groupby method="simple"/>
        </model>
    </models>
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Josef,

I wanted to make sure that there weren't any model actions that might affect your popup.  All looks good.

I would recommend that you examine your page include 'page' and check if any models have the same name as models on the 'calendar' page that you show in your video.  If you have the same model name on the page include, it will update/overwrite the model on the 'parent' page.  This could be why you are seeing an empty popup.

I also wanted to ask if you are using the same page include 'page' for the Log an Event button and in the custom popup for the Calendar.

Thanks,

Bill
Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb
Bill,

You're a genius! This is definitely something to write down. 

Thanks a ton!