Save/Cancel Button Conditional rendering not working in Superbank 6.8.1???

  • 1
  • Problem
  • Updated 2 years ago
  • Acknowledged
  • (Edited)

Upgraded sandbox to Superbank 6.8 this morning, after watching the kickin' announcement video. (And just upgraded to 6.8.1 a bit ago)


I have a page which has a conditionally rendered save/cancel button.  The condition is Model with unsaved changes :


The save/cancel will now not show up when I modify fields in the model.  If I remove the condition, they do the grayed-out-inactive to enabled/active thing.

I could swear I this was working fine for me yesterday, but I made a lot of changes...  SO, I made a super simple new page with 1 model and 2 fields, as below XML.

This test page does the same thing. Given the simple test, I don't see what I could be doing wrong.

Thanks.

XML:


<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true"> <models> <model id="CaseData" limit="20" query="true" createrowifnonefound="false" sobject="Case" doclone="" type=""> <fields> <field id="CaseNumber"/> <field id="Reason"/> <field id="Description"/> <field id="Id"/> </fields> <conditions> <condition type="param" value="caseid" field="Id" state="filterableon" inactive="false" name="id" operator="=" enclosevalueinquotes="true" novaluebehavior=""/> </conditions> <actions/> </model> </models> <components> <pagetitle model="CaseData"> <maintitle> <template>{{CaseNumber}}</template> </maintitle> <subtitle> <template>{{Model.label}}</template> </subtitle> <actions> <action type="savecancel" window="self"> <savehotkeys/> <cancelhotkeys/> <renderconditions logictype="and"> <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="false" fieldmodel="CaseData" sourcetype="modelproperty" sourceproperty="hasChanged" value="true"/> </renderconditions> </action> </actions> <renderconditions logictype="and"/> </pagetitle> <basicfieldeditor showheader="true" showsavecancel="false" model="CaseData" buttonposition="" mode="read" layout=""> <columns> <column width="100%"> <sections> <section title="Section A" collapsible="no"> <fields> <columns> <column width="50%"> <sections> <section title="New Section" collapsible="no" showheader="false"> <fields> <field id="CaseNumber"/> </fields> </section> </sections> </column> <column width="50%"> <sections> <section title="New Section" collapsible="no" showheader="false"> <fields> <field id="Description"/> </fields> </section> </sections> </column> </columns> </fields> </section> </sections> </column> </columns> <renderconditions logictype="and"/> </basicfieldeditor> </components> <resources> <labels/> <javascript/> <css/> </resources> </skuidpage>
 



Photo of Seth Vanderdrift

Seth Vanderdrift

  • 878 Points 500 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Seth Vanderdrift

Seth Vanderdrift

  • 878 Points 500 badge 2x thumb
Anyone?

Made a brand new test page to demonstrate the issue.
- Two Models, one CaseQueue, one CaseData
- Queue in left panel
- Field editor in the right
- 'Fake' (Does nothing) Add-Record button, and Fake Escalate Button, Real Save/Cancel Button
- All 3 buttons have the same rendering condition:


Rendering Condition works as expected for the fake Add-Record and fake Escalate
The Save/Cancel button never appears when CaseData model has a record.

Here's the XML:
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true">
   <models>
      <model id="CaseQueue" limit="20" query="true" createrowifnonefound="false" doclone="" type="" sobject="Case">
         <fields>
            <field id="Id"/>
            <field id="CaseNumber"/>
            <field id="Subject"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
      <model id="CaseData" limit="20" query="false" createrowifnonefound="false" sobject="Case" doclone="" type="">
         <fields>
            <field id="Id"/>
            <field id="CaseNumber"/>
            <field id="Description"/>
            <field id="Subject"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableon" inactive="false" name="Id"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <panelset type="standard" scroll="">
         <panels>
            <panel type="left" width="225">
               <components>
                  <queue tagrendertype="template" querystring="id={{Id}}" defaultitemparameter="id" clickactiontype="multi" searchbox="true" tokenizesearch="true" model="CaseQueue">
                     <rendertemplate>{{{CaseNumber}}} : {{Subject}}</rendertemplate>
                     <actions>
                        <action type="setCondition" model="CaseData" condition="Id" value="{{Id}}"/>
                        <action type="requeryModel" model="CaseData" behavior="standard"/>
                     </actions>
                  </queue>
               </components>
            </panel>
            <panel>
               <components>
                  <pagetitle model="CaseData">
                     <maintitle>
                        <template>{{CaseNumber}}</template>
                     </maintitle>
                     <subtitle>
                        <template>{{Model.label}}</template>
                     </subtitle>
                     <actions>
                        <action type="multi" label="New Request" icon="sk-icon-add">
                           <renderconditions logictype="and">
                              <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="CaseData" sourcetype="modelproperty" sourceproperty="hasRows"/>
                           </renderconditions>
                           <actions>
                              <action type="closeAllPopups">
                                 <models>
                                    <model>CaseData</model>
                                 </models>
                              </action>
                           </actions>
                        </action>
                        <action type="multi" label="Escalate" icon="sk-icon-escalate">
                           <renderconditions logictype="and">
                              <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="CaseData" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="hasRows"/>
                           </renderconditions>
                           <actions>
                              <action type="closeTopmostPopup"/>
                           </actions>
                        </action>
                        <action type="savecancel" window="self">
                           <renderconditions logictype="and">
                              <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="CaseData" sourcetype="modelproperty" sourceproperty="hasRows"/>
                           </renderconditions>
                           <models>
                              <model>CaseData</model>
                           </models>
                        </action>
                     </actions>
                  </pagetitle>
                  <basicfieldeditor showheader="true" showsavecancel="false" model="CaseData" buttonposition="" mode="edit" layout="">
                     <columns>
                        <column width="50%">
                           <sections>
                              <section title="Section A" collapsible="no">
                                 <fields>
                                    <field id="CaseNumber" valuehalign="" type="" readonly="true"/>
                                    <field id="Subject"/>
                                 </fields>
                              </section>
                           </sections>
                        </column>
                        <column width="50%">
                           <sections>
                              <section title="Section B" collapsible="no">
                                 <fields>
                                    <field id="Description"/>
                                 </fields>
                              </section>
                           </sections>
                        </column>
                     </columns>
                  </basicfieldeditor>
               </components>
            </panel>
         </panels>
      </panelset>
   </components>
   <resources>
      <labels/>
      <javascript/>
      <css/>
   </resources>
</skuidpage>
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yup - we are throwing a javascript error there..  That's a bug. 

In the mean time, if you add separate save and cancel buttons  (Look for Action Type Save and Action Type Cancel) they seem to render just fine.  And you get all the cool features..... 
Photo of Jaime

Jaime

  • 1,220 Points 1k badge 2x thumb
I'm encountering this issue still in 8.8. Is this still not fixed or there isn't another work around?