Display error when formula contains invalid field reference

  • 3
  • Idea
  • Updated 4 years ago
  • (Edited)
Due to merge syntax, etc. this likely isn't a trivial matter but would like to see an error displayed either during runtme or design time (ideally both) when a formula field contains a field token that is invalid.

Steps to demonstrate:
1) Create page using XML below
2) Preview page

Desired Behavior
An error displayed either during design time, runtime or ideally both indicating the referenced field is invalid

Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="InvalidFieldInFormula" uionly="true" displaytype="FORMULA" readonly="true" returntype="TEXT" label="InvalidFieldInFormula" precision="9" scale="2" defaultValue="aaaaaa">
               <formula>{{Foobar__c}} + ":" + {{Name}} + ":" + {{FakeField}}</formula>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
      <pagetitle model="Account" uniqueid="sk-2RvtQi-68">
            <action type="delete"/>
            <action type="clone"/>
            <action type="share"/>
            <action type="savecancel" window="self"/>
      <basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="read" uniqueid="sk-2RvtQi-69">
            <column width="50%">
                  <section title="Basics" collapsible="no">
                        <field id="Name"/>
                        <field id="InvalidFieldInFormula" valuehalign="" type=""/>
            <column width="50%">
                  <section title="System Info">
                        <field id="CreatedDate"/>
      <styleitem type="background" bgtype="none"/>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,376 Points 10k badge 2x thumb

Posted 4 years ago

  • 3

Be the first to post a reply!