New line at the end of branch logic breaks the branch during runtime

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
When there's a new line at the end of a branch formula it seems to break the branch merge functionality during runtime. The error I'm getting is:

Uncaught TypeError: Cannot read property 'merges' of null

Reproduce:

add a return character to the end of a branch formula

Also, you can copy this xml and press Query Opp to get the error.
Remove the new line at the end of the formula to get rid of the error.

I'm running Brooklyn Iteration 4.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">    <models>
        <model id="UI" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
            <fields>
                <field id="conditionCheckbox" displaytype="BOOLEAN" ogdisplaytype="TEXT" defaultvaluetype="fieldvalue" defaultValue="true" label="conditionCheckbox"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Opp" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Opportunity">
            <fields>
                <field id="Name"/>
            </fields>
            <conditions/>
            <actions>
                <action>
                    <actions>
                        <action type="branch" model="UI" label="to get this condition to work remove the new line at the end of the formula">
                            <formula>{{$Model.UI.data.0.conditionCheckbox}}==true
</formula>
                            <iftrueactions>
                                <action type="blockUI" message="Branch body reached!" timeout="2000"/>
                            </iftrueactions>
                        </action>
                    </actions>
                    <events>
                        <event>models.loaded</event>
                    </events>
                </action>
            </actions>
        </model>
    </models>
    <components>
        <buttonset model="Opp" uniqueid="sk-Uxerc-236">
            <buttons>
                <button type="multi" label="Query Opp">
                    <actions>
                        <action type="requeryModels" behavior="standard">
                            <models>
                                <model>Opp</model>
                            </models>
                        </action>
                    </actions>
                </button>
            </buttons>
        </buttonset>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,328 Points 4k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Shmuel,

Thanks for the repro page! Our developers are now aware of this issue and we'll let you know when a future release fixes this issue.
Photo of JD Bell

JD Bell, Senior Product Engineer

  • 2,996 Points 2k badge 2x thumb
We've confirmed that this is a bug for server-processed models. If you need a temporary workaround, check the "Process client-side" option on the model's "Advanced" tab.
Photo of Khamla Phimmachack

Khamla Phimmachack, Official Rep

  • 1,536 Points 1k badge 2x thumb
Thank you for your patience as we addressed this bug. This issue has been resolved in the Brooklyn Update 1 - Iteration 2 and Brooklyn - Iteration 6 releases which are now available from the Skuid Releases page

As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!