Rockaway Error: Related record model created on page but not included in Save throws an error when saving

  • 2
  • Problem
  • Updated 2 years ago
  • Acknowledged
  • (Edited)
Skuid Team,

I've just helped a client upgrade to Rockaway and I think we've found a problem.  In many of our pages we have models set up to support creation of related records (as in creating a new Account when creating a new Opportunity).  For these models, we select the option to "Create default row if Model has none".

In Banzai we had no issues whether we actually added a new related record or not.  With Rockaway, we've found many of these pages won't save due to an error 'Required fields are missing:[field name]'.  It seems that Skuid is trying to save the related record model even though we have not issued a 'Save' for that model.

The workaround is to uncheck the option "Create default row if Model has none" and create the row as part of the button that opens the pop up for the related record.  While this works, it means tracking down every page where this situation exists.

Here is the error:



Here is a page that demonstrates this error.  To replicate the issue, just enter a name, stage and close date for the opportunity and click save.:
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Opportunity">    <models>
        <model id="Opportunity" limit="1" query="false" createrowifnonefound="true" adapter="salesforce" service="salesforce" sobject="Opportunity">
            <fields>
                <field id="Name"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
                <field id="Pricebook2Id"/>
                <field id="Pricebook2.Name"/>
                <field id="StageName"/>
                <field id="CloseDate"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Account" limit="20" query="false" createrowifnonefound="true" adapter="salesforce" service="salesforce" type="" sobject="Account">
            <fields>
                <field id="Name"/>
                <field id="Phone"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
    </models>
    <components>
        <pagetitle model="Opportunity" uniqueid="sk-3LJPQE-78">
            <maintitle>
                <template>New {{Model.label}}</template>
            </maintitle>
            <subtitle>
                <template>{{Model.labelPlural}}</template>
            </subtitle>
            <actions>
                <action type="multi" label="Add Account" icon="sk-icon-add">
                    <actions>
                        <action type="showPopup">
                            <popup title="New Popup" width="40%">
                                <components>
                                    <pagetitle model="Account" uniqueid="sk-39WcQH-140">
                                        <maintitle>
                                            <template>{{Name}}</template>
                                        </maintitle>
                                        <subtitle>
                                            <template>{{Model.label}}</template>
                                        </subtitle>
                                        <actions>
                                            <action type="multi" label="Save" icon="sk-icon-save">
                                                <actions>
                                                    <action type="blockUI" message="Saving"/>
                                                    <action type="save">
                                                        <models>
                                                            <model>Account</model>
                                                        </models>
                                                    </action>
                                                    <action type="updateRow" fieldmodel="Opportunity" field="AccountId" enclosevalueinquotes="true" value="{{$Model.Account.data.0.Id}}"/>
                                                    <action type="closeTopmostPopup"/>
                                                    <action type="unblockUI"/>
                                                </actions>
                                            </action>
                                            <action type="multi" label="Cancel" icon="sk-icon-cancel">
                                                <actions>
                                                    <action type="cancel">
                                                        <models>
                                                            <model>Account</model>
                                                        </models>
                                                    </action>
                                                    <action type="closeTopmostPopup"/>
                                                </actions>
                                            </action>
                                        </actions>
                                    </pagetitle>
                                    <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="Account" buttonposition="" uniqueid="sk-39Wdzw-143" mode="edit">
                                        <columns>
                                            <column width="100%">
                                                <sections>
                                                    <section title="Section A" collapsible="no">
                                                        <fields>
                                                            <field id="Name"/>
                                                            <field id="Phone"/>
                                                        </fields>
                                                    </section>
                                                </sections>
                                            </column>
                                        </columns>
                                    </basicfieldeditor>
                                </components>
                            </popup>
                        </action>
                    </actions>
                </action>
                <action type="savecancel" afterCancel="/{{Model.KeyPrefix}}/o" afterSave="/{{Id}}" rollbackonanyerror="true"/>
            </actions>
        </pagetitle>
        <basicfieldeditor showsavecancel="false" showheader="true" model="Opportunity" mode="edit" uniqueid="sk-3LJPQE-79" buttonposition="">
            <columns>
                <column width="50%">
                    <sections>
                        <section title="Basics" collapsible="no">
                            <fields>
                                <field id="Name"/>
                                <field id="StageName"/>
                                <field id="CloseDate"/>
                            </fields>
                        </section>
                    </sections>
                </column>
                <column width="50%">
                    <sections>
                        <section title="Additional Info" collapsible="no">
                            <fields>
                                <field id="AccountId" valuehalign="" type="" optionsource="">
                                    <filters/>
                                    <searchfields/>
                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                </field>
                                <field id="Pricebook2Id" valuehalign="" type="" optionsource="">
                                    <searchfields/>
                                    <filters/>
                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                    <enableconditions logictype="and">
                                        <condition type="blank" operator="!=" fieldmodel="Opportunity" sourcetype="fieldvalue" field="AccountId" value="null" enclosevalueinquotes="false"/>
                                    </enableconditions>
                                </field>
                            </fields>
                        </section>
                    </sections>
                </column>
            </columns>
        </basicfieldeditor>
    </components>
    <resources>
        <labels/>
        <css/>
        <javascript/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb

Posted 2 years ago

  • 2
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Bill~

Thanks for bringing this to our attention! Our devs are aware of this bug and will consider it for a future release. We will update this post when a release is available with a fix for this. 

Thanks!
Karen
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Thanks Karen!
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
Yeah this is huge.  I haven't tried the work around yet. But started receiving tickets regarding the "Required Fields are missing" [Service Contract].  We have contracts with line items that won't save.  We also have Progress reports with Support Goals that won't save.  It broke our popups where we create new records with child records.  
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
I think my error is slightly different though.  Along the same lines with the same error.  I will open a different ticket outlining the issue. In my issue I am including both the parent and the child in the save.  It is like the Id from the parent is not being sent to the child.  If I only save the parent I am fine.  But as soon as I add a child record it throws the error.
(Edited)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Bill.  I think this is the same issue that Rich was describing here:  https://community.skuid.com/skuid/topics/rockaway-error-child-record-creation-throws-error-required-...
Photo of Bill McCullough

Bill McCullough, Champion

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

I think the error was similar.  I just installed 8.15.9 and this has fixed the problem in my developer org.  Thanks for the fast turn around!

Best,

Bill
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Bill~

Glad the issue has been resolved for you!

Karen